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-10-17 15:17:36
|
Revision: 4079 http://fudaa.svn.sourceforge.net/fudaa/?rev=4079&view=rev Author: emmanuel_martin Date: 2008-10-17 15:17:26 +0000 (Fri, 17 Oct 2008) Log Message: ----------- ajout des natures dans les fichier st et changement mineur dans l'aspect du tableau d'importation dans la wizard Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2008-10-17 08:08:51 UTC (rev 4078) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2008-10-17 15:17:26 UTC (rev 4079) @@ -118,7 +118,7 @@ if (str != null) { lignes.add(str); if ("".equals(name)) { - names.add(CtuluLib.getS(isSt_?"_P":"_N")+((GISGeometry)str).getId()); + names.add(CtuluLib.getS(isSt_?"P":"_N")+((GISGeometry)str).getId()); } else { names.add(name); @@ -135,7 +135,7 @@ if (str != null) { lignes.add(str); if ("".equals(name)) { - names.add(CtuluLib.getS("_P")+((GISGeometry)str).getId()); + names.add(CtuluLib.getS("P")+((GISGeometry)str).getId()); } else { names.add(name); @@ -147,7 +147,7 @@ if (lignes.size() > 0) { final GISZoneCollectionLigneBrisee zligs = new GISZoneCollectionLigneBrisee(null); zligs.addAllLineStringClosedOrNode((LineString[]) lignes.toArray(new LineString[lignes.size()]), null); - zligs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE}, null); + zligs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE, GISAttributeConstants.NATURE}, null); if(zligs.getAttributeIsZ()!=null) zligs.setAttributeIsZ(GISAttributeConstants.BATHY); zligs.postImport(0); @@ -157,6 +157,11 @@ for (int i=0; i<names.size(); i++) { attmod.setObject(i,attmod.getAttribute().createDataForGeom(names.get(i),1),null); } + // Affectation de l'attribut nature + attmod=zligs.getModel(GISAttributeConstants.NATURE); + for (int i=0; i<attmod.getSize(); i++) { + attmod.setObject(i,attmod.getAttribute().createDataForGeom(GISAttributeConstants.ATT_NATURE_PF,1),null); + } ret[0]=zligs; } @@ -171,7 +176,7 @@ } zdirs.addAllLineStringClosedOrNode(ldirs, null); - zdirs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE}, null); + zdirs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE, GISAttributeConstants.NATURE}, null); if(zdirs.getAttributeIsZ()!=null) zdirs.setAttributeIsZ(GISAttributeConstants.BATHY); zdirs.postImport(0); @@ -181,6 +186,11 @@ for (int i=0; i<namedirs.length; i++) { attmod.setObject(i,attmod.getAttribute().createDataForGeom(namedirs[i],1),null); } + // Affectation de l'attribut nature + attmod=zdirs.getModel(GISAttributeConstants.NATURE); + for (int i=0; i<attmod.getSize(); i++) { + attmod.setObject(i,attmod.getAttribute().createDataForGeom(GISAttributeConstants.ATT_NATURE_LD,1),null); + } ret[1]=zdirs; } return ret; Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java 2008-10-17 08:08:51 UTC (rev 4078) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java 2008-10-17 15:17:26 UTC (rev 4079) @@ -208,10 +208,23 @@ String value=_value.toString(); if (_value==ModelTableImport.NEW_CALQUE||_value==ModelTableImport.NO_CALQUE) value=FSigLib.getS(value); - return new BuLabel(value); + BuLabel lbl =new BuLabel(value); + lbl.setHorizontalAlignment(BuLabel.CENTER); + return lbl; } - else - return new BuLabel(_value.toString()); + else if (_column==1){ + BuLabel lbl =new BuLabel(_value.toString()); + lbl.setHorizontalAlignment(BuLabel.CENTER); + return lbl; + } + else { + BuLabel lbl =new BuLabel(_value.toString()); + lbl.setHorizontalAlignment(BuLabel.CENTER); + if(_isSelected){ + lbl.setText("<html><b>"+lbl.getText()+"</b></html>"); + } + return lbl; + } } } @@ -456,6 +469,8 @@ pnInfo_.setSrc(data_); // Update du panel d'import table_.setModel(new ModelTableImport(generateTitleColumnTable(), generateDataTable())); + table_.getColumnModel().getColumn(0).setCellRenderer(new ImportTableRenderer()); + table_.getColumnModel().getColumn(1).setCellRenderer(new ImportTableRenderer()); table_.getColumnModel().getColumn(2).setCellRenderer(new ImportTableRenderer()); table_.getColumnModel().getColumn(3).setCellRenderer(new ImportTableRenderer()); ImportTableEditorForBCalqueSelection editor=new ImportTableEditorForBCalqueSelection(); @@ -531,7 +546,7 @@ } protected void fillAttributsPanel(){ - // Si rien n'est selectionn\xE9, on iter sur les lignes jusqu'\xE0 en trouver une ayant des truc amapper mapper + // Si rien n'est selectionn\xE9, on iter sur les lignes jusqu'\xE0 en trouver une ayant des truc a mapper if(table_.getSelectedRow()!=-1) generateMappingAttribute(table_.getSelectedRow()); else{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <emm...@us...> - 2008-10-17 08:09:01
|
Revision: 4078 http://fudaa.svn.sourceforge.net/fudaa/?rev=4078&view=rev Author: emmanuel_martin Date: 2008-10-17 08:08:51 +0000 (Fri, 17 Oct 2008) Log Message: ----------- Ajout de la lecture des natures dans lors de l'import de fichiers sinusx Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SinusxReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel1dTrace.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dCloud.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dConstraintLine.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dContour.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dDirectionLine.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dLevel.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dProfile.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dZone.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/FSigResource.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerExporter.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -39,6 +39,23 @@ /** Une valeur d'attribut valant False */ public final static String ATT_VAL_FALSE="F"; + /** Nature Semis */ + public final static String ATT_NATURE_SM="SM"; + /** Nature Courbe niveau */ + public final static String ATT_NATURE_CN="CN"; + /** Nature Profil */ + public final static String ATT_NATURE_PF="PF"; + /** Nature Ligne directrice */ + public final static String ATT_NATURE_LD="LD"; + /** Nature Ligne de contrainte */ + public final static String ATT_NATURE_LC="LC"; + /** Nature Trace de profil */ + public final static String ATT_NATURE_TP="TP"; + /** Nature Zone */ + public final static String ATT_NATURE_ZN="ZN"; + /** Nature Contour d'\xE9tude */ + public final static String ATT_NATURE_CE="CE"; + /** * Un attribut nom, global. */ Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SinusxReader.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SinusxReader.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SinusxReader.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -12,15 +12,8 @@ import java.io.EOFException; import java.io.File; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Geometry; - -import com.memoire.fu.FuLog; - import org.fudaa.ctulu.CtuluActivity; import org.fudaa.ctulu.CtuluLibFile; import org.fudaa.ctulu.CtuluLibString; @@ -36,10 +29,12 @@ import org.fudaa.ctulu.gis.GISZoneCollectionPoint; import org.fudaa.ctulu.gis.GISZoneCollectionPolygone; import org.fudaa.ctulu.gis.GISZoneCollectionPolyligne; - import org.fudaa.dodico.fortran.FileOpReadCharSimpleAbstract; import org.fudaa.dodico.h2d.resource.H2dResource; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + /** * @version $Id: SinusxReader.java,v 1.22.6.1 2008-04-01 17:12:05 bmarchan Exp $ * @author Fred Deniger @@ -114,11 +109,11 @@ GISZoneCollectionPolygone polygones = null; GISZoneCollectionPolyligne polylignes = null; -// GISAttribute[] atts=new GISAttribute[]{GISAttributeConstants.BATHY,GISAttributeConstants.TITRE}; GISAttributeInterface[] attPts=new GISAttributeInterface[]{ GISAttributeConstants.BATHY, GISAttributeConstants.TITRE, - GISDataModelPointToMultiPointAdapter.ATT_NUM_BLOC + GISDataModelPointToMultiPointAdapter.ATT_NUM_BLOC, + GISAttributeConstants.NATURE }; // Geometry geom; @@ -134,6 +129,7 @@ TDoubleArrayList polyligneXyz = null; boolean ferme = false; boolean niveau = false; + String type = null; try { int lu = 0; boolean afficheAvance = false; @@ -157,7 +153,6 @@ mapInfo = true; } } while (key.isBlocCommentaire(bloc)); - String type = null; // MNTEntite ent = null; // approximation lu += 150; @@ -281,7 +276,11 @@ } if (estPoint(bloc)) { if (pt != null) { - pt.add(Double.parseDouble(bloc), in_.doubleField(1), in_.doubleField(2),Arrays.asList(new Object[]{null,name,idx-1}),null); + if(key.isTypeSemis(type)) + type=GISAttributeConstants.ATT_NATURE_SM; + else + type=""; + pt.add(Double.parseDouble(bloc), in_.doubleField(1), in_.doubleField(2),Arrays.asList(new Object[]{null,name,idx-1, type}),null); } else if (polyligneXyz != null) { polyligneXyz.add(Double.parseDouble(bloc)); polyligneXyz.add(in_.doubleField(1)); @@ -297,40 +296,8 @@ } } // Fin de lecture des points du bloc => Si polyligne ou polygone, cr\xE9ation et ajout des points. - if (polyligneXyz != null) { - addLigne(defZone, polyligneXyz, name, polygones, polylignes, ferme, niveau); -// if (!ferme) { -// ferme = isClosed(polyligneXyz); -// } -// if (ferme) { -// if (polygones == null) { -// polygones = defZone.createPolygoneContainer(); -// polygones.setAttributes(atts, null); -// } -// polyligneXyz.add(polyligneXyz.getQuick(0)); -// polyligneXyz.add(polyligneXyz.getQuick(1)); -// polyligneXyz.add(polyligneXyz.getQuick(2)); -// if (niveau) { -// geom=GISGeometryFactory.INSTANCE.createLinearRingNiveau(new GISCoordinateSequence(polyligneXyz)); -// } else { -// geom=GISGeometryFactory.INSTANCE.createLinearRing(new GISCoordinateSequence(polyligneXyz)); -// } -// polygones.addGeometry(geom, new Object[]{null,name}, null); -// } else { -// if (polylignes == null) { -// polylignes = defZone.createPolyligneContainer(); -// polylignes.setAttributes(atts, null); -// } -// if (niveau) { -// geom=GISGeometryFactory.INSTANCE.createLineStringNiveau(new GISCoordinateSequence(polyligneXyz)); -// } else { -// geom=GISGeometryFactory.INSTANCE.createLineString(new GISCoordinateSequence(polyligneXyz)); -// } -// polylignes.addGeometry(geom, new Object[]{null,name}, null); -// } -// ferme = false; -// niveau = false; - } + if (polyligneXyz != null) + addLigne(defZone, polyligneXyz, name, type, polygones, polylignes, ferme, niveau); ferme = false; niveau = false; } @@ -339,41 +306,10 @@ } catch (final NumberFormatException e) { analyze_.manageException(e); } - if (stop_) { + if (stop_) return null; - } - if (polyligneXyz != null) { - addLigne(defZone, polyligneXyz, name, polygones, polylignes, ferme, niveau); -// if (!ferme) { -// ferme = isClosed(polyligneXyz); -// } -// if (ferme) { -// if (polygones == null) { -// polygones = defZone.createPolygoneContainer(); -// polygones.setAttributes(atts, null); -// } -// polyligneXyz.add(polyligneXyz.getQuick(0)); -// polyligneXyz.add(polyligneXyz.getQuick(1)); -// polyligneXyz.add(polyligneXyz.getQuick(2)); -// if (niveau) { -// geom=GISGeometryFactory.INSTANCE.createLinearRingNiveau(new GISCoordinateSequence(polyligneXyz)); -// } else { -// geom=GISGeometryFactory.INSTANCE.createLinearRing(new GISCoordinateSequence(polyligneXyz)); -// } -// polygones.addGeometry(geom, new Object[]{null,name}, null); -// } else { -// if (polylignes == null) { -// polylignes = defZone.createPolyligneContainer(); -// polylignes.setAttributes(atts, null); -// } -// if (niveau) { -// geom=GISGeometryFactory.INSTANCE.createLineStringNiveau(new GISCoordinateSequence(polyligneXyz)); -// } else { -// geom=GISGeometryFactory.INSTANCE.createLineString(new GISCoordinateSequence(polyligneXyz)); -// } -// polylignes.addGeometry(geom, new Object[]{null,name}, null); -// } - } + if (polyligneXyz != null) + addLigne(defZone, polyligneXyz, name, type, polygones, polylignes, ferme, niveau); for(int i=0;i<defZone.getPointCollections().length;i++) defZone.getPointCollections()[i].setAttributeIsZ(GISAttributeConstants.BATHY); @@ -387,7 +323,7 @@ return defZone; } - private void addLigne(GISZone _defZone, TDoubleArrayList _polyligneXyz, String _name, GISZoneCollection _polygones, GISZoneCollection _polylignes, + private void addLigne(GISZone _defZone, TDoubleArrayList _polyligneXyz, String _name, String _type, GISZoneCollection _polygones, GISZoneCollection _polylignes, boolean _ferme, boolean _niveau) { if (_polyligneXyz.size()<=3) { // Une polyligne ne peut pas contenir moins de 2 points. @@ -395,7 +331,21 @@ return; } - GISAttribute[] atts=new GISAttribute[]{GISAttributeConstants.BATHY,GISAttributeConstants.TITRE}; + // D\xE9termination de la nature + String nature=""; + final SinusxKeyWord key = new SinusxKeyWord(); + if (key.isTypeCourbe(_type)) + nature=""; + else if (key.isTypeCourbeNiveau(_type)) + nature=GISAttributeConstants.ATT_NATURE_CN; + else if (key.isTypeProfil(_type)) + nature=GISAttributeConstants.ATT_NATURE_PF; + + GISAttribute[] atts=new GISAttribute[]{ + GISAttributeConstants.BATHY, + GISAttributeConstants.TITRE, + GISAttributeConstants.NATURE + }; Geometry geom; if (!_ferme) { @@ -411,14 +361,11 @@ _polyligneXyz.add(_polyligneXyz.getQuick(0)); _polyligneXyz.add(_polyligneXyz.getQuick(1)); _polyligneXyz.add(_polyligneXyz.getQuick(2)); - if (_niveau) { + if (_niveau) geom=GISGeometryFactory.INSTANCE.createLinearRingNiveau(new GISCoordinateSequence(_polyligneXyz)); -// polygones.addPolygoneNiveau(new GISCoordinateSequence(polyligneXyz), null); - } else { + else geom=GISGeometryFactory.INSTANCE.createLinearRing(new GISCoordinateSequence(_polyligneXyz)); -// polygones.addPolygone(new GISCoordinateSequence(polyligneXyz), null); - } - _polygones.addGeometry(geom, new Object[]{null,_name}, null); + _polygones.addGeometry(geom, new Object[]{null,_name, nature}, null); } else { if (_polylignes == null) { _polylignes = _defZone.createPolyligneContainer(); @@ -426,14 +373,11 @@ if(_polylignes.getAttributeIsZ()!=null) _polylignes.setAttributeIsZ(GISAttributeConstants.BATHY); } - if (_niveau) { + if (_niveau) geom=GISGeometryFactory.INSTANCE.createLineStringNiveau(new GISCoordinateSequence(_polyligneXyz)); -// polylignes.addPolyligneNiveau(new GISCoordinateSequence(polyligneXyz), null); - } else { + else geom=GISGeometryFactory.INSTANCE.createLineString(new GISCoordinateSequence(_polyligneXyz)); -// polylignes.addPolyligne(new GISCoordinateSequence(polyligneXyz), null); - } - _polylignes.addGeometry(geom, new Object[]{null,_name}, null); + _polylignes.addGeometry(geom, new Object[]{null,_name, nature}, null); } _ferme = false; _niveau = false; Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -504,13 +504,13 @@ int indexNature=source[j].getIndiceOf(GISAttributeConstants.NATURE); if (nature==""&&indexNature==-1) concernedGeom.add(source[j]); - else if (nature!=""&&indexNature!=-1) { + else if (indexNature!=-1) { boolean correctNature=false; int k=-1; while (!correctNature&&++k<source[j].getNumGeometries()) correctNature=(String)source[j].getValue(indexNature, k)==nature; if (correctNature) - concernedGeom.add(data_.getPoints()[j]); + concernedGeom.add(source[j]); } } // 3 : r\xE9cup\xE9ration des attributs disponibles dans les g\xE9om\xE9tries Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel1dTrace.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel1dTrace.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel1dTrace.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -38,6 +38,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(null); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_TP); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_TP); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dCloud.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dCloud.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dCloud.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -47,6 +47,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(GISAttributeConstants.BATHY); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_SM); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_SM); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dConstraintLine.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dConstraintLine.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dConstraintLine.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -38,6 +38,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(GISAttributeConstants.BATHY); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_LC); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_LC); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dContour.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dContour.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dContour.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -37,6 +37,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(null); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_CE); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_CE); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dDirectionLine.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dDirectionLine.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dDirectionLine.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -40,6 +40,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(GISAttributeConstants.BATHY); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_LD); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_LD); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dLevel.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dLevel.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dLevel.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -43,6 +43,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(zglob); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_CN); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_CN); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dProfile.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dProfile.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dProfile.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -39,6 +39,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(GISAttributeConstants.BATHY); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_PF); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_PF); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dZone.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dZone.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/layer/MdlModel2dZone.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -37,6 +37,6 @@ // Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo. getGeomData().setAttributes(attrs, null); getGeomData().setAttributeIsZ(null); - getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, FSigResource.ATT_NATURE_ZN); + getGeomData().setFixedAttributeValue(GISAttributeConstants.NATURE, GISAttributeConstants.ATT_NATURE_ZN); } } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/FSigResource.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/FSigResource.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/FSigResource.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -17,25 +17,7 @@ * @author Fred Deniger */ public final class FSigResource extends FudaaResource { - - /** Nature Semis */ - public final static String ATT_NATURE_SM="SM"; - /** Nature Courbe niveau */ - public final static String ATT_NATURE_CN="CN"; - /** Nature Profil */ - public final static String ATT_NATURE_PF="PF"; - /** Nature Ligne directrice */ - public final static String ATT_NATURE_LD="LD"; - /** Nature Ligne de contrainte */ - public final static String ATT_NATURE_LC="LC"; - /** Nature Trace de profil */ - public final static String ATT_NATURE_TP="TP"; - /** Nature Zone */ - public final static String ATT_NATURE_ZN="ZN"; - /** Nature Contour d'\xE9tude */ - public final static String ATT_NATURE_CE="CE"; - public final static FSigResource FSIG = new FSigResource(FudaaResource.FUDAA); private FSigResource(final BuResource _b) { Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerExporter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerExporter.java 2008-10-16 20:35:47 UTC (rev 4077) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerExporter.java 2008-10-17 08:08:51 UTC (rev 4078) @@ -204,13 +204,13 @@ else { GISDataModel mdl=GISDataModelFilterAdapter.buildAdapter(_filter.getCollect(_filter.polyCq_.get(i)), new GISAttributeInterface[]{GISAttributeConstants.TITRE,GISAttributeConstants.NATURE}); - if (FSigResource.ATT_NATURE_CN.equals(col.getValue(idxAtt,0))) { + if (GISAttributeConstants.ATT_NATURE_CN.equals(col.getValue(idxAtt,0))) { mdlniv.add(mdl); } - else if (FSigResource.ATT_NATURE_PF.equals(col.getValue(idxAtt,0))) { + else if (GISAttributeConstants.ATT_NATURE_PF.equals(col.getValue(idxAtt,0))) { mdlprofs.add(mdl); } - else if (FSigResource.ATT_NATURE_LD.equals(col.getValue(idxAtt,0))) { + else if (GISAttributeConstants.ATT_NATURE_LD.equals(col.getValue(idxAtt,0))) { mdlligdir.add(mdl); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-10-16 20:35:51
|
Revision: 4077 http://fudaa.svn.sourceforge.net/fudaa/?rev=4077&view=rev Author: deniger Date: 2008-10-16 20:35:47 +0000 (Thu, 16 Oct 2008) Log Message: ----------- Modified Paths: -------------- 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/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-16 20:33:27 UTC (rev 4076) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-16 20:35:47 UTC (rev 4077) @@ -150,8 +150,8 @@ if (widget_.getEbliScene() != null) { // position a cote de la widget graphe - final Point nouvellePosition = new Point((widget_.getLocation().x), (int) (widget_.getLocation().y + widget_ - .getBounds().height * 1.2)); +// final Point nouvellePosition = new Point((widget_.getLocation().x), (int) (widget_.getLocation().y + widget_ +// .getBounds().height * 1.2)); if (!hasLegende()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-10-16 20:33:37
|
Revision: 4076 http://fudaa.svn.sourceforge.net/fudaa/?rev=4076&view=rev Author: deniger Date: 2008-10-16 20:33:27 +0000 (Thu, 16 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModelPersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/mv/TestProfile.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistantData.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -3,10 +3,7 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.List; -import java.util.Random; -import com.memoire.fu.FuLog; - /** * Generateur d'Id uniques en singleton. * Gere des contraintes (id ajout\xE9s, retir\xE9s) 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-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -802,7 +802,7 @@ * Retourne les donn\xE9es persistantes. * @return */ - public ZebliCalqueDataPersitant getPersistenceManager() { + public ZEbliCalquesPanelPersistManager getPersistenceManager() { return null; } Copied: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java (from rev 4075, branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -0,0 +1,36 @@ +package org.fudaa.ebli.calque; + +import java.io.File; +import java.util.Map; + +/** + * Interface des datas persistantes du calques. + * Sont enregistrees dans un ficheir xml. + * Doivent etre serializables. + * Propose les methodes de construction du calque et de sauvegarde des donn\xE9es. + * @author Adrien Hadoux + * + */ +public interface ZEbliCalquesPanelPersistManager { + + /** + * Remplit l'interface avec les donn\xE9es. + * @param p + */ + public void fillInfoWith(ZEbliCalquesPanel p,File dirGeneralData); + + /** + * Permet de generer le calque coprrespondant aux donnees persistantes. + * @param parameters + * @return + */ + public ZEbliCalquesPanel generateCalquePanel(Map parameters,File dirGeneralData); + + /** + * Methode utilisee pour recuperer un nom plus 'comprehensible' + * A utiliser dans le cas d'une serialization xml de la classe: on donne ainsi un nom plus coh\xE9rent a la balise au lieu du nom de classe. + * @return + */ + + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java ___________________________________________________________________ Added: svn:mergeinfo + Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -1,36 +0,0 @@ -package org.fudaa.ebli.calque; - -import java.io.File; -import java.util.Map; - -/** - * Interface des datas persistantes du calques. - * Sont enregistrees dans un ficheir xml. - * Doivent etre serializables. - * Propose les methodes de construction du calque et de sauvegarde des donn\xE9es. - * @author Adrien Hadoux - * - */ -public interface ZebliCalqueDataPersitant { - - /** - * Remplit l'interface avec les donn\xE9es. - * @param p - */ - public void fillInfoWith(ZEbliCalquesPanel p,File dirGeneralData); - - /** - * Permet de generer le calque coprrespondant aux donnees persistantes. - * @param parameters - * @return - */ - public ZEbliCalquesPanel generateCalquePanel(Map parameters,File dirGeneralData); - - /** - * Methode utilisee pour recuperer un nom plus 'comprehensible' - * A utiliser dans le cas d'une serialization xml de la classe: on donne ainsi un nom plus coh\xE9rent a la balise au lieu du nom de classe. - * @return - */ - - -} 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-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -8,10 +8,6 @@ import java.io.ObjectOutputStream; import java.util.Map; -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ebli.courbe.EGGrapheTreeModel; -import org.fudaa.ebli.courbe.EGGroupPersist; - import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; @@ -107,9 +103,11 @@ out = getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); //-- recuperation des datats persistantes specifiques au panel --// - ZebliCalqueDataPersitant dataPersistantes = panelTopersist.getPersistenceManager(); + 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 @@ -131,16 +129,16 @@ // 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. * @@ -168,7 +166,7 @@ // -- etape 1: on lit les donn\xE9es sp\xE9cifiques pour avoir la data persistantes in = getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); - ZebliCalqueDataPersitant dataPersistantes = (ZebliCalqueDataPersitant) in.readObject(); + ZEbliCalquesPanelPersistManager dataPersistantes = (ZEbliCalquesPanelPersistManager) in.readObject(); // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes veritablePanel = dataPersistantes.generateCalquePanel(param,new File(getSpecifiqueDataFilePath())); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -10,7 +10,6 @@ import java.io.IOException; import org.fudaa.ctulu.CtuluArkSaver; -import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.calque.BCalquePersistenceGroupe; @@ -33,38 +32,42 @@ * @version $Id: FudaaFilleVisuPersistence.java,v 1.9 2007-06-20 12:23:38 deniger Exp $ */ public class FudaaFilleVisuPersistence implements FudaaSavable { - - ZEbliFilleCalques visu_; + + ZEbliCalquesPanel visu_; String rep_ = "data"; + + // /** + // * Cas ou l'on veut sauvegarder directement un calquePanel + // */ + // ZEbliCalquesPanel calquepanel_; + /** - * Cas ou l'on veut sauvegarder directement un calquePanel - */ - ZEbliCalquesPanel calquepanel_; - - /** * constructeur reserv\xE9 au ZEbliFilleCalques + * * @param _visu */ public FudaaFilleVisuPersistence(final ZEbliFilleCalques _visu) { super(); FudaaSaveLib.configureDb4o(); - visu_ = _visu; + visu_ = _visu.getVisuPanel(); } - + /** * constructeur reserv\xE9 au ZEbliCalquesPanel + * * @param _calque */ - public FudaaFilleVisuPersistence(final ZEbliCalquesPanel _calque, CtuluUI ui) { - super(); - FudaaSaveLib.configureDb4o(); - ZEbliFilleCalques fille = new ZEbliFilleCalques(ui, _calque.getGcDonnees()); - calquepanel_ = _calque; - visu_ = fille; - } + public FudaaFilleVisuPersistence(final ZEbliCalquesPanel _calque) { + super(); + FudaaSaveLib.configureDb4o(); + // ZEbliFilleCalques fille = new ZEbliFilleCalques(ui, _calque.getGcDonnees()); + // calquepanel_ = _calque; + visu_ = _calque; + } /** * Methode utilisee pour sauvegarder le zeblicalquepanel. + * * @param _writer * @param _prog */ @@ -84,8 +87,6 @@ // } // } - - public void saveIn(final CtuluArkSaver _writer, final ProgressionInterface _prog) { try { final BGroupeCalque donneesCalque = visu_.getDonneesCalque(); @@ -131,7 +132,7 @@ saveData.ptMaxY_ = b.e_.y_; saveData.ptMinX_ = b.o_.x_; saveData.ptMinY_ = b.o_.y_; - saveData.legendUI_ = visu_.getVisuPanel().getCqLegend().saveUIProperties(); + saveData.legendUI_ = visu_.getCqLegend().saveUIProperties(); final BCalque selectedLayers = visu_.getCalqueActif(); if (selectedLayers != null) { saveData.selectedLayer_ = selectedLayers.getName(); @@ -149,7 +150,7 @@ saveData == null ? null : saveData.props_); final BCalquePersistenceGroupe persistenceMng = parent.getGroupePersistenceMng(); persistenceMng.setTop(true); - persistenceMng.restoreFrom(adapter, visu_.getVisuPanel(), parent, rep_ + '/', null, _prog); + persistenceMng.restoreFrom(adapter, visu_, parent, rep_ + '/', null, _prog); return restoreFille(saveData, _impl, parent); } catch (final RuntimeException _evt) { FuLog.error(_evt); @@ -167,7 +168,7 @@ if (saveData.props_ != null) { final BCalquePersistenceGroupe gr = new BCalquePersistenceGroupe(); gr.setTop(true); - gr.restore(saveData.props_, visu_.getVisuPanel(), parent, _prog); + gr.restore(saveData.props_, visu_, parent, _prog); } return restoreFille(saveData, _impl, parent); } catch (final RuntimeException _evt) { @@ -202,8 +203,8 @@ b.ajuste(_saveData.ptMinX_, _saveData.ptMinY_, 0); visu_.getVueCalque().changeRepere(visu_, b); } - if (_saveData.legendUI_ != null && visu_.getVisuPanel().getCqLegend() != null) { - visu_.getVisuPanel().getCqLegend().initFrom(_saveData.legendUI_); + if (_saveData.legendUI_ != null && visu_.getCqLegend() != null) { + visu_.getCqLegend().initFrom(_saveData.legendUI_); } } }; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -20,14 +20,13 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import org.fudaa.ctulu.CtuluLibFile; + import com.db4o.Db4o; import com.db4o.ObjectContainer; - import com.memoire.fu.FuEmptyArrays; import com.memoire.fu.FuLog; -import org.fudaa.ctulu.CtuluLibFile; - /** * @author fred deniger * @version $Id: FudaaSaveZipLoader.java,v 1.4 2007-01-08 15:38:19 deniger Exp $ @@ -59,6 +58,15 @@ m_.put(_key, _value); } + public void safeClose() { + try { + close(); + } catch (final IOException _evt) { + FuLog.error(_evt); + + } + } + public String getOption(final String _key) { return m_ == null ? null : (String) m_.get(_key); } @@ -115,9 +123,7 @@ public InputStream getInputStream(final String _entry) { try { final ZipEntry entry = file_.getEntry(_entry); - if (entry == null) { - return null; - } + if (entry == null) { return null; } return file_.getInputStream(entry); } catch (final IOException _evt) { FuLog.error(_evt); @@ -128,9 +134,7 @@ public InputStream getReader(final String _parentDir, final String _entryName) { try { final ZipEntry entry = file_.getEntry(_parentDir + _entryName); - if (entry == null) { - return null; - } + if (entry == null) { return null; } return file_.getInputStream(entry); } catch (final IOException _evt) { FuLog.error(_evt); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -19,6 +19,7 @@ import com.db4o.Db4o; import com.db4o.ObjectContainer; +import com.memoire.fu.FuLog; import org.fudaa.ctulu.CtuluArkSaver; import org.fudaa.ctulu.CtuluLibFile; @@ -61,20 +62,18 @@ } } + ObjectContainer cont_; File dbFile_; final File f_; public static String getIdFromEntry(final String _entry) { - if (_entry == null) { - return null; - } + if (_entry == null) { return null; } final int idx = _entry.indexOf('-'); - if (idx >= 0) { - return _entry.substring(0, idx + 1); - } + if (idx >= 0) { return _entry.substring(0, idx + 1); } return null; } + Map nameDirZip_; final ZipOutputStream zipOut_; @@ -105,6 +104,15 @@ } } + public void safeClose() { + try { + close(); + } catch (final IOException _evt) { + FuLog.error(_evt); + + } + } + public boolean isDirCreated(final String _name) { return (nameDirZip_ != null) && nameDirZip_.containsKey(_name); } @@ -127,9 +135,7 @@ public DirZipEntry createDirZipEntry(final String _name, final int _nbEntry) { if (nameDirZip_ == null) { nameDirZip_ = new HashMap(); - } else if (nameDirZip_.containsKey(_name)) { - throw new IllegalAccessError("ebtry is already created"); - } + } else if (nameDirZip_.containsKey(_name)) { throw new IllegalAccessError("ebtry is already created"); } final DirZipEntry res = new DirZipEntry(_name, _nbEntry); nameDirZip_.put(_name, res); return res; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -42,8 +42,7 @@ void profilPanelCreated(MvProfileFillePanel _panel, ProgressionInterface _prog, String _title); /** - * Get data trpostsource. - * @return + * TODO a enlever car ne doit pas dependre de Tr */ TrPostSource getDataSource(); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModelPersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModelPersist.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModelPersist.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -2,8 +2,6 @@ import java.util.Map; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsBuilder; -import org.fudaa.fudaa.tr.post.TrPostCourbeTreeModel; import org.fudaa.fudaa.tr.post.TrPostProjet; import org.fudaa.fudaa.tr.post.TrPostSource; import org.fudaa.fudaa.tr.post.actions.TrPostProfileAction; @@ -55,7 +53,9 @@ } } - + /** + * TODO a enlever car ne doit pas dependre de Tr + */ /** * Methode qui remplit cetet classe a partir du modele fourni en entree. */ Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -442,7 +442,6 @@ - @Override public TrPostSource getDataSource() { // TODO Auto-generated method stub return null; 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-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -35,7 +35,7 @@ import org.fudaa.ebli.calque.ZCalqueSondeInteraction; import org.fudaa.ebli.calque.ZCalqueSondeInterface; import org.fudaa.ebli.calque.ZEbliCalquePanelController; -import org.fudaa.ebli.calque.ZebliCalqueDataPersitant; +import org.fudaa.ebli.calque.ZEbliCalquesPanelPersistManager; import org.fudaa.ebli.calque.ZebliCalquePersist; import org.fudaa.ebli.calque.action.CalqueActionSonde; import org.fudaa.ebli.calque.action.EbliCalqueActionTimeChooser; @@ -70,8 +70,8 @@ public class TrPostVisuPanel extends TrVisuPanel implements TrPostDataListener, EbliAnimatedInterface { @Override - public ZebliCalqueDataPersitant getPersistenceManager() { - return new TrPostVisuPanelPersistantData(); + public ZEbliCalquesPanelPersistManager getPersistenceManager() { + return new TrPostVisuPanelPersistManager(); } private class EvolutionAction extends EbliActionSimple { Copied: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java (from rev 4075, branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistantData.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -0,0 +1,198 @@ +package org.fudaa.fudaa.tr.post; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.Map; + +import org.fudaa.ctulu.CtuluArkSaver; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.calque.ZebliCalquePersist; +import org.fudaa.ebli.calque.ZEbliCalquesPanelPersistManager; +import org.fudaa.ebli.courbe.EGGroupPersist; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; +import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; +import org.fudaa.fudaa.commun.save.FudaaSaveZipLoader; +import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; + +import com.db4o.ObjectContainer; +import com.memoire.fu.FuLog; +import com.thoughtworks.xstream.XStream; + +/** + * Version persistante du trpostVisuPanel. Peut etre sauvegard\xE9, a partir d'un trpostvisupanel et permet de sauvegarder + * un autre trpostvisupanel + * + * @author Adrien Hadoux + */ +public class TrPostVisuPanelPersistManager implements ZEbliCalquesPanelPersistManager +/* extends ZEbliCalquesPanelPersistenceManager */{ + + // -- Donnees qui vont etre persistees et enregistree telles qu'elle --// + + boolean simplified; + String idSource; + + TrPostVisuPanelPersistManager() { + + } + + // /** + // * Remplit les infos persistantes avec celle du trpostvisupanel + // * + // * @param panel + // */ + public void fillInfoWith(ZEbliCalquesPanel p, File dirGeneralData) { + TrPostVisuPanel panel = (TrPostVisuPanel) p; + simplified = panel.simplifiedInit; + idSource = panel.getSource().getId(); + + // //-- etape 2: on sauvegarde les donnees --// + FudaaSaveZipWriter writer = null; + try { + dirGeneralData.mkdirs(); + writer = new FudaaSaveZipWriter(new File(dirGeneralData, "calques.zip")); + new FudaaFilleVisuPersistence(panel).saveIn(writer, panel.getCtuluUI().getMainProgression()); + } catch (IOException e) { + FuLog.error(e); + } finally { + if (writer != null) { + writer.safeClose(); + } + } + + } + + /** + * Methode qui reconstruit le trpostvisupanel a partir des donn\xE9es persistantes. + * + * @param parameters + * @return + */ + public ZEbliCalquesPanel generateCalquePanel(Map parameters, File dirGeneralData) { + + TrPostProjet projet = (TrPostProjet) parameters.get("TrPostProjet"); + + if (projet == null) return null; + + // -- etape 1: recherche du source qui contient le path donn\xE9 --// + TrPostSource src = projet.findSourceById(idSource); + + // -- etape 2 si source pas trouv\xE9, chargement du source --// + if (src == null) { + // TrPostMultiSourceActivator activator = new TrPostMultiSourceActivator(projet); + // activator.active(new File(idSource), projet.getImpl()); + return null; + } + + // -- etape 3: creation du legende adapter --// + final CalqueLegendeWidgetAdapter legendeCalque = new CalqueLegendeWidgetAdapter( + (EbliScene) parameters.get("scene"), null); + + // -- etape 3: creation du panel --// + if (src == null) return null; + + TrPostVisuPanel newPanel = new TrPostVisuPanel(projet.getImpl(), projet, legendeCalque, src); + + // -- restorer les donn\xE9es --// + FudaaSaveZipLoader loader = null; + try { + loader = new FudaaSaveZipLoader(new File(dirGeneralData, "calques.zip")); + (new FudaaFilleVisuPersistence(newPanel)).restore(newPanel.getImpl(), loader, newPanel.getImpl() + .getMainProgression()); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (loader != null) loader.safeClose(); + } + + return newPanel; + } + + // @Override + // public ZEbliCalquesPanel loadPersitCalqueXml(Map _param, File _dir) { + // + // + // //-- recuperation des donn\xE9es serializees xml --// + // + // + // TrPostProjet projet = (TrPostProjet) _param.get("TrPostProjet"); + // + // if (projet == null) return null; + // + // // -- etape 1: recherche du source qui contient le path donn\xE9 --// + // TrPostSource src = projet.findSource(data_.pathSource); + // + // // -- etape 2 si source pas trouv\xE9, chargement du source --// + // if (src == null) { + // TrPostMultiSourceActivator activator = new TrPostMultiSourceActivator(projet); + // activator.active(new File(data_.pathSource), projet.getImpl()); + // } + // + // // -- etape 3: creation du legende adapter --// + // final CalqueLegendeWidgetAdapter legendeCalque = new CalqueLegendeWidgetAdapter( + // (EbliScene) _param.get("scene"), null); + // + // // -- etape 3: creation du panel --// + // if (src == null) return null; + // + // TrPostVisuPanel newPanel = new TrPostVisuPanel(projet.getImpl(), projet, legendeCalque, src); + // + // // -- accessoire: restorer les donn\xE9es --// + // // try { + // // (new FudaaFilleVisuPersistence(panel, panel.getImpl())).restore(panel.getImpl(), new FudaaSaveZipLoader(f), + // // panel.getImpl() + // // .getMainProgression()); + // // } catch (IOException e) { + // // e.printStackTrace(); + // // } + // + // return newPanel; + // + // + // } + // + // @Override + // public void savePersitCalqueXml(ZEbliCalquesPanel _panelTopersist, File _dir, Map _params) { + // //TODO il faut persister les datas + // TrPostVisuPanelPersistenceManagerData data= new TrPostVisuPanelPersistenceManagerData(); + // //TODO ici il faudrait sauvegarder un identifiant de source comme ce doit etre le cas pour les graphes + // data.pathSource=((TrPostVisuPanel)_panelTopersist).getSource().getFile().getAbsolutePath(); + // //sauvegarder les datas avec xstream + // ObjectOutputStream out = null; + // + // + // try{ + // out=getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); + // //-- ecriture de l'obejt data --// + // out.writeObject(data); + // + // } catch (IOException e) { + // // TODO Auto-generated catch block + // e.printStackTrace(); + // } + // finally{ + // try { + // out.close(); + // } catch (IOException e) { + // // TODO Auto-generated catch block + // e.printStackTrace(); + // } + // } + // + // + // //-- etape 2: on sauvegarde les donnees --// + // try { + // new FudaaFilleVisuPersistence(_panelTopersist, _panelTopersist.getCtuluUI()).saveIn(new FudaaSaveZipWriter(_dir), + // _panelTopersist.getCtuluUI().getMainProgression()); + // } catch (IOException e) { + // e.printStackTrace(); + // } + // + // } + +} Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistantData.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistantData.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistantData.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -1,201 +0,0 @@ -package org.fudaa.fudaa.tr.post; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.util.Map; - -import org.fudaa.ctulu.CtuluArkSaver; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.ebli.calque.ZebliCalquePersist; -import org.fudaa.ebli.calque.ZebliCalqueDataPersitant; -import org.fudaa.ebli.courbe.EGGroupPersist; -import org.fudaa.ebli.visuallibrary.EbliScene; -import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; -import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; -import org.fudaa.fudaa.commun.save.FudaaSaveZipLoader; -import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; - -import com.db4o.ObjectContainer; -import com.thoughtworks.xstream.XStream; - -/** - * Version persistante du trpostVisuPanel. Peut etre sauvegard\xE9, a partir d'un trpostvisupanel et permet de sauvegarder - * un autre trpostvisupanel - * - * @author Adrien Hadoux - */ -public class TrPostVisuPanelPersistantData implements ZebliCalqueDataPersitant -/*extends ZEbliCalquesPanelPersistenceManager*/ { - - - //-- Donnees qui vont etre persistees et enregistree telles qu'elle --// - - boolean simplified; - String idSource; - - - - TrPostVisuPanelPersistantData() { - - } - - - - -// /** -// * Remplit les infos persistantes avec celle du trpostvisupanel -// * -// * @param panel -// */ - public void fillInfoWith(ZEbliCalquesPanel p, File dirGeneralData) { - TrPostVisuPanel panel = (TrPostVisuPanel) p; - simplified = panel.simplifiedInit; - idSource = panel.getSource().getId(); - -// //-- etape 2: on sauvegarde les donnees --// - try { - new FudaaFilleVisuPersistence(panel, panel.getCtuluUI()).saveIn(new FudaaSaveZipWriter(dirGeneralData), - panel.getCtuluUI().getMainProgression()); - } catch (IOException e) { - e.printStackTrace(); - } - - } - - - - /** - * Methode qui reconstruit le trpostvisupanel a partir des donn\xE9es persistantes. - * - * @param parameters - * @return - */ - public ZEbliCalquesPanel generateCalquePanel(Map parameters,File dirGeneralData) { - - TrPostProjet projet = (TrPostProjet) parameters.get("TrPostProjet"); - - if (projet == null) return null; - - // -- etape 1: recherche du source qui contient le path donn\xE9 --// - TrPostSource src = projet.findSourceById(idSource); - - // -- etape 2 si source pas trouv\xE9, chargement du source --// - if (src == null) { -// TrPostMultiSourceActivator activator = new TrPostMultiSourceActivator(projet); -// activator.active(new File(idSource), projet.getImpl()); - return null; - } - - // -- etape 3: creation du legende adapter --// - final CalqueLegendeWidgetAdapter legendeCalque = new CalqueLegendeWidgetAdapter( - (EbliScene) parameters.get("scene"), null); - - // -- etape 3: creation du panel --// - if (src == null) return null; - - TrPostVisuPanel newPanel = new TrPostVisuPanel(projet.getImpl(), projet, legendeCalque, src); - - //-- restorer les donn\xE9es --// - try { - (new FudaaFilleVisuPersistence(newPanel, newPanel.getImpl())).restore(newPanel.getImpl(), new FudaaSaveZipLoader(dirGeneralData), - newPanel.getImpl() - .getMainProgression()); - } catch (IOException e) { - e.printStackTrace(); - } - - return newPanel; - } - - - - - - -// @Override -// public ZEbliCalquesPanel loadPersitCalqueXml(Map _param, File _dir) { -// -// -// //-- recuperation des donn\xE9es serializees xml --// -// -// -// TrPostProjet projet = (TrPostProjet) _param.get("TrPostProjet"); -// -// if (projet == null) return null; -// -// // -- etape 1: recherche du source qui contient le path donn\xE9 --// -// TrPostSource src = projet.findSource(data_.pathSource); -// -// // -- etape 2 si source pas trouv\xE9, chargement du source --// -// if (src == null) { -// TrPostMultiSourceActivator activator = new TrPostMultiSourceActivator(projet); -// activator.active(new File(data_.pathSource), projet.getImpl()); -// } -// -// // -- etape 3: creation du legende adapter --// -// final CalqueLegendeWidgetAdapter legendeCalque = new CalqueLegendeWidgetAdapter( -// (EbliScene) _param.get("scene"), null); -// -// // -- etape 3: creation du panel --// -// if (src == null) return null; -// -// TrPostVisuPanel newPanel = new TrPostVisuPanel(projet.getImpl(), projet, legendeCalque, src); -// -// // -- accessoire: restorer les donn\xE9es --// -// // try { -// // (new FudaaFilleVisuPersistence(panel, panel.getImpl())).restore(panel.getImpl(), new FudaaSaveZipLoader(f), -// // panel.getImpl() -// // .getMainProgression()); -// // } catch (IOException e) { -// // e.printStackTrace(); -// // } -// -// return newPanel; -// -// -// } -// -// @Override -// public void savePersitCalqueXml(ZEbliCalquesPanel _panelTopersist, File _dir, Map _params) { -// //TODO il faut persister les datas -// TrPostVisuPanelPersistenceManagerData data= new TrPostVisuPanelPersistenceManagerData(); -// //TODO ici il faudrait sauvegarder un identifiant de source comme ce doit etre le cas pour les graphes -// data.pathSource=((TrPostVisuPanel)_panelTopersist).getSource().getFile().getAbsolutePath(); -// //sauvegarder les datas avec xstream -// ObjectOutputStream out = null; -// -// -// try{ -// out=getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); -// //-- ecriture de l'obejt data --// -// out.writeObject(data); -// -// } catch (IOException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } -// finally{ -// try { -// out.close(); -// } catch (IOException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } -// } -// -// -// //-- etape 2: on sauvegarde les donnees --// -// try { -// new FudaaFilleVisuPersistence(_panelTopersist, _panelTopersist.getCtuluUI()).saveIn(new FudaaSaveZipWriter(_dir), -// _panelTopersist.getCtuluUI().getMainProgression()); -// } catch (IOException e) { -// e.printStackTrace(); -// } -// -// } - -} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/mv/TestProfile.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/mv/TestProfile.java 2008-10-16 18:57:07 UTC (rev 4075) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/mv/TestProfile.java 2008-10-16 20:33:27 UTC (rev 4076) @@ -48,6 +48,10 @@ private TestProfile() {} protected static class ProfileTarget implements MvProfileTarget { + public TrPostSource getDataSource() { + return null; + } + final TrPostSource src_; EGDialog d_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-16 18:57:14
|
Revision: 4075 http://fudaa.svn.sourceforge.net/fudaa/?rev=4075&view=rev Author: hadouxad Date: 2008-10-16 18:57:07 +0000 (Thu, 16 Oct 2008) Log Message: ----------- - Fichier central de source cr?\195?\169e qui lie ID source/path source - V?\195?\169ritable notion d'id: -les id une fois fourni sont acquis pour toute la dur?\195?\169e de vie de la widget., idem pour les sources - Gestion intelligente des id des sources: affectation sur la demande et recopiage de l'id dans le cas de persistance - De m?\195?\170me que pour les Ebliwidget: - Les moulinettes pour les graphes sp?\195?\169cifiques sont termin?\195?\169es et fonctionnent NICKEL!! - enregistrement des donn?\195?\169es sp?\195?\169cifiques - variables - Points de pas de temsp - Points interpol?\195?\169s - Ligne de d?\195?\169part linestring poru les mvprofie - Gestion des id pour la sauvegarde du calque/ et du graphe - Gestion de la suppression des sources: supprime les widget linked to the source(cf mail de ce matin). TrPostScene. removeAllWidgetLinkedToSrc(Trpostsource) - Ajout des images poru les actions cubatures, bilan et lignes de courant - remise en place des moulinettes chargement/sauvegarde calque Toujours le m?\195?\170me probl?\195?\168me du restore: arrive a ?\195?\169crire mais ne parvient pas a lire le fichier sauver avec restore... Classe TrPostVisuPanelPersistantData LIGNE 103 (new FudaaFilleVisuPersistence(newPanel, newPanel.getImpl())).restore(newPanel.getImpl(), new FudaaSaveZipLoader(dirGeneralData), newPanel.getImpl() SI ON LA COMMENTE CA RECHARGE BIEN LE CALQUE. Probleme du zipFile qui n'arrive pas a vourir le fichier enregistr?\195?\169 par saveIn.... Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.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/graphe/EbliWidgetCreatorGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.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/TrPostActionLigneCourants.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.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/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/TrPostMultiSourceActivator.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/TrPostScene.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSource.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.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/actions/TrPostActionBilan.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionCubature.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostProfileAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_calc1.png branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_calc2.png branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_oscilloscope.png branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModelPersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModelPersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistantData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManagerData.java Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_calc1.png =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_calc1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_calc2.png =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_calc2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_oscilloscope.png =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_oscilloscope.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream 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-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -797,8 +797,12 @@ public final void setModeVisible(final boolean _b) { mode_.setVisible(_b); } - - public ZEbliCalquesPanelPersistenceManager getPersistenceManager() { + + /** + * Retourne les donn\xE9es persistantes. + * @return + */ + public ZebliCalqueDataPersitant getPersistenceManager() { return null; } Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java 2008-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -1,162 +0,0 @@ -package org.fudaa.ebli.calque; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.util.Map; - -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ebli.courbe.EGGrapheTreeModel; -import org.fudaa.ebli.courbe.EGGroupPersist; - -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.io.xml.DomDriver; - -/** - * Classe qui gere les diff\xE9rents fichiers pour la persistance du calque. Doit recevoir en parametre le path du - * repertoire dans lequel sera sauvegard\xE9 le calque. - * - * @author Adrien Hadoux - */ -public abstract class ZEbliCalquesPanelPersistenceManager { - - /** - * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et model... - */ - String directoryPath_; - Map parameters_; - - private XStream parser_; - - private static String MAINFILE = "descriptorCalque.xml"; - private static String DATA = "datas.xml"; - private static String SPECIFIQUEFILE = "specificDatas.xml"; - - public ZEbliCalquesPanelPersistenceManager() {} - - /** - * Recupere le parser adequat. - * - * @return - */ - private XStream getParser() { - if (parser_ == null) parser_ = initXmlParser(); - return parser_; - } - - /** - * Init le parser avec les alias adequats. - * - * @return - */ - private XStream initXmlParser() { - XStream xstream = new XStream(new DomDriver()); - // -- creation des alias pour que ce soit + parlant dans le xml file --// - xstream.alias("Groupe", EGGroupPersist.class); - - return xstream; - } - - /** - * Path vers els datas classique du calque - * - * @return - */ - private String getDataFilePath() { - return directoryPath_ + File.separator + DATA; - } - - /** - * Retourne le path vers le fiochier principal des courbes - * - * @return - */ - private String getMainFilePath() { - return directoryPath_ + File.separator + MAINFILE; - } - - /** - * Retourne le chemin vers le fichier de datats specifiques. - * - * @return - */ - private String getSpecifiqueDataFilePath() { - return directoryPath_ + File.separator + SPECIFIQUEFILE; - } - - /** - * Enrtegistre le calque au format persistant xml. - * - * @param parameters des parametres supplementaires utiles. - * @throws IOException - */ - public abstract void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist, File _dir, Map params) ; - - // } - // } - - // 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; - - } - - /** - * Methode qui remplit le panel fournit en parametre avec les donn\xE9es sauvegardees. - * - * @param panelToFill - */ - public abstract ZEbliCalquesPanel loadPersitCalqueXml(Map param, File _dir) ; -// { -// return null; - // 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(getSpecifiqueDataFilePath()))); - // ZebliCalqueDataPersitant dataPersistantes = (ZebliCalqueDataPersitant) in.readObject(); - // - // // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes - // veritablePanel = dataPersistantes.generateCalquePanel(param); - // - // } 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; -// } - -} Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -0,0 +1,36 @@ +package org.fudaa.ebli.calque; + +import java.io.File; +import java.util.Map; + +/** + * Interface des datas persistantes du calques. + * Sont enregistrees dans un ficheir xml. + * Doivent etre serializables. + * Propose les methodes de construction du calque et de sauvegarde des donn\xE9es. + * @author Adrien Hadoux + * + */ +public interface ZebliCalqueDataPersitant { + + /** + * Remplit l'interface avec les donn\xE9es. + * @param p + */ + public void fillInfoWith(ZEbliCalquesPanel p,File dirGeneralData); + + /** + * Permet de generer le calque coprrespondant aux donnees persistantes. + * @param parameters + * @return + */ + public ZEbliCalquesPanel generateCalquePanel(Map parameters,File dirGeneralData); + + /** + * Methode utilisee pour recuperer un nom plus 'comprehensible' + * A utiliser dans le cas d'une serialization xml de la classe: on donne ainsi un nom plus coh\xE9rent a la balise au lieu du nom de classe. + * @return + */ + + +} Copied: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java (from rev 4070, branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -0,0 +1,194 @@ +package org.fudaa.ebli.calque; + +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.Map; + +import org.fudaa.ctulu.CtuluUI; +import org.fudaa.ebli.courbe.EGGrapheTreeModel; +import org.fudaa.ebli.courbe.EGGroupPersist; + +import com.thoughtworks.xstream.XStream; +import com.thoughtworks.xstream.io.xml.DomDriver; + +/** + * Classe qui gere les diff\xE9rents fichiers pour la persistance du calque. Doit recevoir en parametre le path du + * repertoire dans lequel sera sauvegard\xE9 le calque. + * + * @author Adrien Hadoux + */ +public class ZebliCalquePersist { + + /** + * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et model... + */ + protected String directoryPath_; + + protected XStream parser_; + +/** + * 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; + } + + /** + * Recupere le parser adequat. + * + * @return + */ + protected XStream getParser() { + if (parser_ == null) parser_ = initXmlParser(); + return parser_; + } + + /** + * Init le parser avec les alias adequats. + * + * @return + */ + 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 + * + * @return + */ + protected String getDataFilePath() { + return directoryPath_ + File.separator + DATA; + } + + /** + * Retourne le path vers le fiochier principal des courbes + * + * @return + */ + protected String getMainFilePath() { + return directoryPath_ + File.separator + MAINFILE; + } + + /** + * Retourne le chemin vers le fichier de datats specifiques. + * + * @return + */ + protected String getSpecifiqueDataFilePath() { + return directoryPath_ + File.separator + SPECIFIQUEFILE; + } + + /** + * Enrtegistre le calque au format persistant xml. + * + * @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 --// + ZebliCalqueDataPersitant dataPersistantes = panelTopersist.getPersistenceManager(); + + //-- enregistrement des don\xE9nes sp\xE9cifiques du calque -// + 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(); + } + } + } + + + + // 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; + + } + + /** + * 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()))); + ZebliCalqueDataPersitant dataPersistantes = (ZebliCalqueDataPersitant) in.readObject(); + + // -- 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; + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java 2008-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -8,6 +8,7 @@ package org.fudaa.ebli.courbe; import java.awt.Component; +import java.util.Map; import javax.swing.JComboBox; @@ -166,7 +167,7 @@ * Ces donn\xE9es pourront etre facilement serializee par un parser xml, bdd, ou texte * @return */ - public Object getSpecificPersitDatas(); + public Object getSpecificPersitDatas(Map Params); /** @@ -174,7 +175,7 @@ *Ces donn\xE9es proviennent de fichier de sauvegardes (xml,texte,bdd...) * @return */ - public void setSpecificPersitDatas(Object sepcPersitData); + public void setSpecificPersitDatas(Object sepcPersitData,Map Params); } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -38,7 +38,7 @@ private static String COURBEDIRECTORY="courbes"; - public EGGraphePersist(String directoryPath_, Map parameters) throws IOException { + public EGGraphePersist(String directoryPath_) throws IOException { this.directoryPath_ = directoryPath_; } @@ -123,7 +123,7 @@ * @param parameters des parametres supplementaires utiles. * @throws IOException */ - public void savePersitGrapheXml(EGGraphe grapheTopersist) { + public void savePersitGrapheXml(EGGraphe grapheTopersist,Map parameters) { String mainfile=getMainFilePath(); //-- outputstream du xstream pour enregistrement des diff\xE9rents groupes--// ObjectOutputStream out=null; @@ -194,7 +194,7 @@ } //-- on enregistre les donn\xE9es specifiques en fonction du type de grapheModel --// - Object specifiquesDatas=grapheTopersist.getModel().getSpecificPersitDatas(); + Object specifiquesDatas=grapheTopersist.getModel().getSpecificPersitDatas(parameters); if(specifiquesDatas ==null ) return; try { @@ -246,7 +246,7 @@ * @throws IllegalAccessException * @throws InstantiationException */ - public EGGraphe loadPersitGrapheXml() throws FileNotFoundException, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException{ + public EGGraphe loadPersitGrapheXml(Map parameters) throws FileNotFoundException, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException{ EGGraphe graphe=null; String mainfile=getMainFilePath(); File fichierCourbes=getDirectoryCurves(); @@ -293,6 +293,35 @@ //mise a jour des b\xE9b\xE9s model.fireStructureChanged(); } + + + //-- on charge les donn\xE9es specifiques en fonction du type de grapheModel --// + ObjectInputStream in=null; + try { + //-- inputstream du xstream pour chargement des diff\xE9rents groupes--// + in = getParser().createObjectInputStream(new FileReader(new File(getSpecifiqueDataFilePath()))); + + //-- lecture des donn\xE9es specifiques --// + Object specifiquesDatas=in.readObject(); + + //-- remplissage du modele avec les donn\xE9es persistantes --// + graphe.getModel().setSpecificPersitDatas(specifiquesDatas, parameters); + + + + } 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 graphe; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java 2008-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -15,6 +15,7 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; +import java.util.Map; import javax.swing.AbstractListModel; import javax.swing.ComboBoxModel; @@ -799,12 +800,12 @@ return duplic; } -public Object getSpecificPersitDatas() { +public Object getSpecificPersitDatas(Map parameters) { // TODO Auto-generated method stub return null; } -public void setSpecificPersitDatas(Object sepcPersitData) { +public void setSpecificPersitDatas(Object sepcPersitData,Map parameters) { // TODO Auto-generated method stub } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java 2008-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -1124,11 +1124,11 @@ this.selectionModel_ = selectionModel_; } -public Object getSpecificPersitDatas() { - return null; +public Object getSpecificPersitDatas(Map Params) { + return "mod\xE8le g\xE9n\xE8rique"; } -public void setSpecificPersitDatas(Object sepcPersitData) { +public void setSpecificPersitDatas(Object sepcPersitData,Map Params) { } 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-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -9,6 +9,7 @@ import java.util.Map; import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.calque.ZebliCalquePersist; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; @@ -130,8 +131,8 @@ File createRep = new File(pathUnique); if (createRep.mkdir() || createRep.isDirectory()) { // (new FudaaFilleVisuPersistence(getCalque())).saveZEbliCalquesPanelIn - getCalque().getPersistenceManager().savePersitCalqueXml(getCalque(), createRep, parameters); -// new ZebliCalquePersist(pathUnique, parameters).savePersitCalqueXml(getCalque()); + // getCalque().getPersistenceManager().savePersitCalqueXml(getCalque(), createRep, parameters); + (new ZebliCalquePersist(pathUnique)).savePersitCalqueXml(getCalque(),parameters); } @@ -145,16 +146,7 @@ else { String pathCalque = (String) data; -// try { -//// calque_ = (new ZebliCalquePersist(pathCalque, parameters)).loadPersitCalqueXml(parameters); -// -// } catch (FileNotFoundException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (IOException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } + calque_ = (new ZebliCalquePersist(pathCalque)).loadPersitCalqueXml(parameters); } } 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-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -119,8 +119,8 @@ // - sauvegarde du contenu de l eggraphe dans un repertoire a part --// try { final File createRep = new File(pathUnique); - if (createRep.mkdir() || createRep.isDirectory()) new EGGraphePersist(pathUnique, parameters) - .savePersitGrapheXml(getGraphe()); + if (createRep.mkdir() || createRep.isDirectory()) new EGGraphePersist(pathUnique) + .savePersitGrapheXml(getGraphe(),parameters); } catch (final IOException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -137,7 +137,7 @@ final String pathGraphe = (String) data; try { - pn_ = new EGFillePanel(new EGGraphePersist(pathGraphe, parameters).loadPersitGrapheXml()); + pn_ = new EGFillePanel(new EGGraphePersist(pathGraphe).loadPersitGrapheXml(parameters)); } catch (final Exception e) { FuLog.error(e); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java 2008-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -12,6 +12,7 @@ import org.fudaa.dodico.ef.EfGridData; import org.fudaa.dodico.ef.interpolation.EfInterpolator; import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeListModel; +import org.fudaa.fudaa.tr.post.TrPostSource; /** * Une interface donnant tout ce qui est n\xE9cessaire \xE0 la g\xE9n\xE9ral de profil spatial. @@ -39,5 +40,11 @@ FudaaCourbeTimeListModel getTimeModel(); void profilPanelCreated(MvProfileFillePanel _panel, ProgressionInterface _prog, String _title); + + /** + * Get data trpostsource. + * @return + */ + TrPostSource getDataSource(); } 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-10-16 14:58:47 UTC (rev 4074) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2008-10-16 18:57:07 UTC (rev 4075) @@ -14,6 +14,7 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Set; import javax.swing.tree.TreePath; @@ -34,6 +35,7 @@ import org.fudaa.dodico.ef.operation.EfLineIntersection; import org.fudaa.dodico.ef.operation.EfLineIntersectionsCorrectionTester; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsBuilder; +import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsDefault; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsMng; import org.fudaa.dodico.h2d.type.H2dVariableType; @@ -53,7 +55,11 @@ import org.fudaa.fudaa.commun.courbe.FudaaCourbeImporter.Target; import org.fudaa.fudaa.meshviewer.MvResource; import org.fudaa.fudaa.meshviewer.export.MvExportChooseVarAndTime; +import org.fudaa.fudaa.tr.post.TrPostProjet; +import org.fudaa.fudaa.tr.post.TrPostSource; +import org.fudaa.fudaa.tr.post.actions.TrPostProfileAction; + import com.memoire.bu.BuLib; import com.memoire.bu.BuResource; import com.vividsolutions.jts.geom.Coordinate; @@ -64,628 +70,649 @@ * @version $Id: MvProfileTreeModel.java,v 1.12 2007-06-13 14:46:13 deniger Exp $ */ public class MvProfileTreeModel extends EGGrapheTreeModel implements Target { - FudaaCourbeTimeListModel timeModel_; - EfLineIntersectionsResultsMng resNode_; - EfLineIntersectionsResultsBuilder builderNode_; - EfLineIntersectionsResultsBuilder builderMesh_; - EfLineIntersectionsResultsMng resMesh_; + FudaaCourbeTimeListModel timeModel_; + EfLineIntersectionsResultsMng resNode_; + EfLineIntersectionsResultsBuilder builderNode_; + EfLineIntersectionsResultsBuilder builderMesh_; + EfLineIntersectionsResultsMng resMesh_; - final EfLineIntersectionsCorrectionTester tester_; - public MvProfileTarget target_; + EfLineIntersectionsCorrectionTester tester_; + + /** + * Ligne initialement utilis\xE9e pour la creation de la courbe + */ + LineString initLineNode; + LineString initLineMesh; + + + public MvProfileTarget target_; - public MvProfileTreeModel(final MvProfileTarget _target, final EfLineIntersectionsCorrectionTester _tester) { - super(); - timeModel_ = _target.getTimeModel(); - tester_ = _tester; - target_ = _target; - } + public MvProfileTreeModel(final MvProfileTarget _target, final EfLineIntersectionsCorrectionTester _tester) { + super(); + timeModel_ = _target.getTimeModel(); + tester_ = _tester; + target_ = _target; + } - public MvProfileTreeModel(final MvProfileTreeModel _model) { - super(); - timeModel_ = _model.target_.getTimeModel(); - tester_ = _model.tester_; - target_ = _model.target_; - } + public MvProfileTreeModel(final MvProfileTreeModel _model) { + super(); + timeModel_ = _model.target_.getTimeModel(); + tester_ = _model.tester_; + target_ = _model.target_; + } - /** - * ACHTUNG! Constructuer uniquement utilis\xE9 pour la serialization des graphes!! Il faut imp\xE9rativement initialiser la - * variable target_ avec un ProfilDapter apres coup avec le trpostsource qui convient - */ - public MvProfileTreeModel() { - tester_ = new MvProfileCoteTester(); + /** + * ACHTUNG! Constructuer uniquement utilis\xE9 pour la serialization des graphes!! Il faut imp\xE9rativement initialiser la + * variable target_ avec un ProfilDapter apres coup avec le trpostsource qui convient + */ + public MvProfileTreeModel() { + tester_ = new MvProfileCoteTester(); - } + } - public void setNodesResults(final EfLineIntersectionsResultsMng _resNode, - final EfLineIntersectionsResultsBuilder _builderNode) { - resNode_ = _resNode; - builderNode_ = _builderNode; - } + public void setNodesResults(final EfLineIntersectionsResultsMng _resNode, + final EfLineIntersectionsResultsBuilder _builderNode) { + resNode_ = _resNode; + builderNode_ = _builderNode; + if(builderNode_!=null ) + initLineNode=builderNode_.getInitLine_(); + + + } - public EfLineIntersectionsResultsBuilder getBuilderFor(final CtuluVariable _v) { - return target_.getData().isElementVar(_v) ? builderMesh_ : builderNode_; - } + public EfLineIntersectionsResultsBuilder getBuilderFor(final CtuluVariable _v) { + return target_.getData().isElementVar(_v) ? builderMesh_ : builderNode_; + } - public void setMeshesResults(final EfLineIntersectionsResultsMng _resMeshes, - final EfLineIntersectionsResultsBuilder _builderMeshes) { - resMesh_ = _resMeshes; - builderMesh_ = _builderMeshes; + public void setMeshesResults(final EfLineIntersectionsResultsMng _resMeshes, + final EfLineIntersectionsResultsBuilder _builderMeshes) { + resMesh_ = _resMeshes; + builderMesh_ = _builderMeshes; + if(builderMesh_!=null ) + initLineMesh=builderMesh_.getInitLine_(); - } + } - public EfLineIntersectionsResultsMng getResMesh() { - return resMesh_; - } + public EfLineIntersectionsResultsMng getResMesh() { + return resMesh_; + } - public H2dVariableType[] getVariables() { + public H2dVariableType[] getVariables() { - final List values = getShownVar(); + final List values = getShownVar(); - return null; - } + return null; + } - @Override - public boolean isStructureModifiable() { - return true; - } + @Override + public boolean isStructureModifiable() { + return true; + } - public void updateTimeStep(final int[] _idx, final ProgressionInterface _prog) { - blockEvents_ = true; - final FudaaCourbeTimeListModel newModel = target_.getTimeModel(); + public void updateTimeStep(final int[] _idx, final ProgressionInterface _prog) { + blockEvents_ = true; + final FudaaCourbeTimeListModel newModel = target_.getTimeModel(); - if (newModel != null) { - final boolean structureChanged = newModel.getSize() != timeModel_.getSize(); - // timeModel_.updateFrom(newModel); - if (structureChanged) { - timeModel_.fireStructureChanged(); - } else { - timeModel_.fireContentChanged(); - } - blockEvents_ = false; - BuLib.invokeLater(new Runnable() { + if (newModel != null) { + final boolean structureChanged = newModel.getSize() != timeModel_.getSize(); + // timeModel_.updateFrom(newModel); + if (structureChanged) { + timeModel_.fireStructureChanged(); + } else { + timeModel_.fireContentChanged(); + } + blockEvents_ = false; + BuLib.invokeLater(new Runnable() { - public void run() { - fireCourbeContentChanged(null, true); - if (structureChanged) { - final EGObject[] cs = getSelectedObjects(); - if (cs != null) { - for (int i = 0; i < cs.length; i++) { + public void run() { + fireCourbeContentChanged(null, true); + if (structureChanged) { + final EGObject[] cs = getSelectedObjects(); + if (cs != null) { + for (int i = 0; i < cs.length; i++) { - if (cs[i] instanceof MvProfileCourbeTime) { - ((MvProfileCourbeTime) cs[i]).selection_.setSelectionInterval(timeModel_.getSize() - 1, timeModel_ - .getSize() - 1); - } - } - } - } - } + if (cs[i] instanceof MvProfileCourbeTime) { + ((MvProfileCourbeTime) cs[i]).selection_.setSelectionInterval(timeModel_.getSize() - 1, timeModel_ + .getSize() - 1); + } + } + } + } + } - }); - } + }); + } - } + } - MvProfileGridPalette paletteGrid_; + MvProfileGridPalette paletteGrid_; - public EfLineIntersectionsResultsI[] getDefaultRes() { - return new EfLineIntersectionsResultsI[] { resNode_ == null ? null : resNode_.getDefaultRes(), - resMesh_ == null ? null : resMesh_.getDefaultRes() }; - } + public EfLineIntersectionsResultsI[] getDefaultRes() { + return new EfLineIntersectionsResultsI[] { resNode_ == null ? null : resNode_.getDefaultRes(), + resMesh_ == null ? null : resMesh_.getDefaultRes() }; + } - public static LineString createLineString(final EfLineIntersectionsResultsMng _res) { - if (_res == null) { return null; } - return createLineString(_res.getDefaultRes()); - } + public static LineString createLineString(final EfLineIntersectionsResultsMng _res) { + if (_res == null) { return null; } + return createLineString(_res.getDefaultRes()); + } - private static LineString createLineString(final EfLineIntersectionsResultsI _res) { - final Coordinate[] cs = new Coordinate[_res.getNbIntersect()]; - for (int i = cs.length - 1; i >= 0; i--) { - final EfLineIntersection intersect = _res.getIntersect(i); - cs[i] = new Coordinate(intersect.getX(), intersect.getY()); - } - return GISGeometryFactory.INSTANCE.createLineString(cs); - } + private static LineString createLineString(final EfLineIntersectionsResultsI _res) { + final Coordinate[] cs = new Coordinate[_res.getNbIntersect()]; + for (int i = cs.length - 1; i >= 0; i--) { + final EfLineIntersection intersect = _res.getIntersect(i); + cs[i] = new Coordinate(intersect.getX(), intersect.getY()); + } + return GISGeometryFactory.INSTANCE.createLineString(cs); + } - /** - * Recherche le bon groupe pour les profils spatiaux. peut creer le groupe si booleen est a true. - * - * @param _v - * @param _create - * @return - */ - public MvProfileCourbeGroup getGroup(final CtuluVariable _v, final boolean _create) { - for (int i = getNbEGObject() - 1; i >= 0; i--) { - final EGGroup g = getGroup(i); - if ((g instanceof MvProfileCourbeGroup) && ((MvProfileCourbeGroup) g).getVar() == _v) { return (MvProfileCourbeGroup) g; } - } - if (_create) { - final MvProfileCourbeGroup g = MvProfileFillePanel.createGroupFor(_v); - super.add(g); - return g; - } - return null; + /** + * Recherche le bon groupe pour les profils spatiaux. peut creer le groupe si booleen est a true. + * + * @param _v + * @param _create + * @return + */ + public MvProfileCourbeGroup getGroup(final CtuluVariable _v, final boolean _create) { + for (int i = getNbEGObject() - 1; i >= 0; i--) { + final EGGroup g = getGroup(i); + if ((g instanceof MvProfileCourbeGroup) && ((MvProfileCourbeGroup) g).getVar() == _v) { return (MvProfileCourbeGroup) g; } + } + if (_create) { + final MvProfileCourbeGroup g = MvProfileFillePanel.createGroupFor(_v); + super.add(g); + return g; + } + return null; - } + } - @Override - public boolean canDeleteCourbes() { - return true; - } + @Override + public boolean canDeleteCourbes() { + return true; + } - @Override - public void duplicateCourbe(final CtuluCommandManager _mng, final EGCourbe _c) { - if (!(_c instanceof MvProfileCourbeTime)) { return; } - super.duplicateCourbe(_mng, _c); - } + @Override + public void duplicateCourbe(final CtuluCommandManager _mng, final EGCourbe _c) { + if (!(_c instanceof MvProfileCourbeTime)) { return; } + super.duplicateCourbe(_mng, _c); + } - @Override - protected EGCourbeChild duplicateCourbe(final EGCourbeChild _c) { - return ((MvProfileCourbeTime) _c).duplicate(); - } + @Override + protected EGCourbeChild duplicateCourbe(final EGCourbeChild _c) { + return ((MvProfileCourbeTime) _c).duplicate(); + } - @Override - public boolean canAddCourbe() { - return true; - } + @Override + public boolean canAddCourbe() { + return true; + } - public boolean canComputeFlowrate() { - final boolean isVarContained = target_.getData().isDefined(H2dVariableType.HAUTEUR_EAU) - && target_.getData().isDefined(H2dVariableType.VITESSE_U) - && target_.getData().isDefined(H2dVariableType.VITESSE_V); - if (isVarContained) { - final boolean elt = target_.getData().isElementVar(H2dVariableType.HAUTEUR_EAU); - if (target_.getData().isElementVar(H2dVariableType.VITESSE_U) != elt) { return false; } - if (target_.getData().isElementVar(H2dVariableType.VITESSE_V) != elt) { return false; } - if (elt && resMesh_ == null) { return false; } - if (!elt && resNode_ == null) { return false; } - } - return true; - } + public boolean canComputeFlowrate() { + final boolean isVarContained = target_.getData().isDefined(H2dVariableType.HAUTEUR_EAU) + && target_.getData().isDefined(H2dVariableType.VITESSE_U) + && target_.getData().isDefined(H2dVariableType.VITESSE_V); + if (isVarContained) { + final boolean elt = target_.getData().isElementVar(H2dVariableType.HAUTEUR_EAU); + if (target_.getData().isElementVar(H2dVariableType.VITESSE_U) != elt) { return false; } + if (target_.getData().isElementVar(H2dVariableType.VITESSE_V) != elt) { return false; } + if (elt && resMesh_ == null) { return false; } + if (!elt && resNode_ == null) { return false; } + } + return true; + } - /** - * retourne la liste des variables du graphe. - * - * @return - */ - public List getShownVar() { - final List res = new ArrayList(getNbEGObject() - 1); - for (int i = getNbEGObject() - 1; i >= 0; i--) { - final EGGroup g = getGroup(i); - if (g.getChildCount() > 0 && (g instanceof MvProfileCourbeGroup)) { - res.add(((MvProfileCourbeGroup) g).getVar()); - } - } - return res; + /** + * retourne la liste des variables du graphe. + * + * @return + */ + public List getShownVar() { + final List res = new ArrayList(getNbEGObject() - 1); + for (int i = getNbEGObject() - 1; i >= 0; i--) { + final EGGroup g = getGroup(i); + if (g.getChildCount() > 0 && (g instanceof MvProfileCourbeGroup)) { + res.add(((MvProfileCourbeGroup) g).getVar()); + } + } + return res; - } + } - public void addNewCourbe(final CtuluCommandManager _cmd, final Component _c, final EGGraphe _graphe, final CtuluUI _ui) { - final MvProfileCourbeGroup groupBathy = getGroup(H2dVariableType.BATHYMETRIE, false); - final MvProfileCourbeGroup groupCote = getGroup(H2dVariableType.COTE_EAU, false); - final boolean mustUseSameAxe = groupBathy == null || groupCote == null; - CtuluVariable[] vars = target_.getVars(); - if (timeModel_ == null) { - final List l = new ArrayList(Arrays.asList(vars)); - l.removeAll(getShownVar()); - vars = (CtuluVariable[]) l.toArray(new CtuluVariable[l.size()]); + public void addNewCourbe(final CtuluCommandManager _cmd, final Component _c, final EGGraphe _graphe, final CtuluUI _ui) { + final MvProfileCourbeGroup groupBathy = getGroup(H2dVariableType.BATHYMETRIE, false); + final MvProfileCourbeGroup groupCote = getGroup(H2dVariableType.COTE_EAU, false); + final boolean mustUseSameAxe = groupBathy == null || groupCote == null; + CtuluVariable[] vars = target_.getVars(); + if (timeModel_ == null) { + final List l = new ArrayList(Arrays.asList(vars)); + l.removeAll(getShownVar()); + vars = (CtuluVariable[]) l.toArray(new CtuluVariable[l.size()]); - } - final MvExportChooseVarAndTime res = new MvExportChooseVarAndTime(CtuluLibSwing.createListModel(vars), timeModel_, - null); - if (timeModel_ != null) { - final int i = timeModel_.getSize() - 1; - res.getTimeSelectionModel().setSelectionInterval(i, i); - } - if (res.afficheModaleOk(_c)) { - new CtuluRunnable(BuResource.BU.getString("Ajouter"), _ui) { - @Override - public boolean run(final ProgressionInterface _proj) { - addNewCourbes(_graphe, mustUseSameAxe, res, _proj); - return true; - }; - }.run(); + } + final MvExportChooseVarAndTime res = new MvExportChooseVarAndTime(CtuluLibSwing.createListModel(vars), timeModel_, + null); + if (timeModel_ != null) { + final int i = timeModel_.getSize() - 1; + res.getTimeSelectionModel().setSelectionInterval(i, i); + } + if (res.afficheModaleOk(_c)) { + new CtuluRunnable(BuResource.BU.getString("Ajouter"), _ui) { + @Override + public boolean run(final ProgressionInterface _proj) { + addNewCourbes(_graphe, mustUseSameAxe, res, _proj); + return true; + }; + }.run(); - } + } - } + } - void addNewCourbes(final EGGraphe _graphe, final boolean _mustUseSameAxe, final MvExportChooseVarAndTime _res, - final ProgressionInterface _prog) { + void addNewCourbes(final EGGraphe _graphe, final boolean _mustUseSameAxe, final MvExportChooseVarAndTime _res, + final ProgressionInterface _prog) { - final CtuluVariable[] var = _res.getSelectedVar(); - final boolean mustUseSameAxe = _mustUseSameAxe - && (CtuluLibArray.containsObject(var, H2dVariableType.BATHYMETRIE) || CtuluLibArray.containsObject(var, - H2dVariableType.COTE_EAU)); - if (CtuluLibArray.isEmpty(var)) { return; } - int[] ts = _res.getSelectedTimeStepIdx(); - if (ts == null) { - if (timeModel_ != null) { return; } - ts = new int[0]; - } - final boolean isTime = timeModel_ != null; - for (int i = 0; i < var.length; i++) { - final MvProfileCourbeGroup g = getGroup(var[i], true); - final Color c = MvProfileFillePanel.getColorFor(i + 1, var[i]); - final EfLineIntersectionsResultsBuilder results = getBuilderFor(var[i]); - EGCourbeChild child; - for (int t = 0; t < ts.length; t++) { - final MVProfileCourbeModel model = new MVProfileCourbeModel(var[i], target_.getData(), ts[t], results, _prog); - if (isTime) { - model.setTitle(var[i].toString() + CtuluLibString.ESPACE + timeModel_.getElementAt(ts[t])); - child = new MvProfileCourbeTime(g, model, timeModel_); - } else { - child = new MvProfileCourbe(g, model); - } - final EGCourbeChild childFinal = child; - EventQueue.invokeLater(new Runnable() { - public void run() { - childFinal.setAspectContour(c); - g.addEGComponent(childFinal); + final CtuluVariable[] var = _res.getSelectedVar(); + final boolean mustUseSameAxe = _mustUseSameAxe + && (CtuluLibArray.containsObject(var, H2dVariableType.BATHYMETRIE) || CtuluLibArray.containsObject(var, + H2dVariableType.COTE_EAU)); + if (CtuluLibArray.isEmpty(var)) { return; } + int[] ts = _res.getSelectedTimeStepIdx(); + if (ts == null) { + if (timeModel_ != null) { return; } + ts = new int[0]; + } + final boolean isTime = timeModel_ != null; + for (int i = 0; i < var.length; i++) { + final MvProfileCourbeGroup g = getGroup(var[i], true); + final Color c = MvProfileFillePanel.getColorFor(i + 1, var[i]); + final EfLineIntersectionsResultsBuilder results = getBuilderFor(var[i]); + EGCourbeChild child; + for (int t = 0; t < ts.length; t++) { + final MVProfileCourbeModel model = new MVProfileCourbeModel(var[i], target_.getData(), ts[t], results, _prog); + if (isTime) { + model.setTitle(var[i].toString() + CtuluLibString.ESPACE + timeModel_.getElementAt(ts[t])); + child = new MvProfileCourbeTime(g, model, timeModel_); + } else { + child = new MvProfileCourbe(g, model); + } + final EGCourbeChild childFinal = child; + EventQueue.invokeLater(new Runnable() { + public void run() { + childFinal.setAspectContour(c); + g.addEGComponent(childFinal); - } + } - }); + }); - } - } - finishCreation(_graphe, mustUseSameAxe); - } + } + } + finishCreation(_graphe, mustUseSameAxe); + } - private void finishCreation(final EGGraphe _graphe, final boolean _mustUseSameAxe) { - EventQueue.invokeLater(new Runnable() { - public void run() { - final TreePath[] old = getSelectionModel().getSelectionPaths(); - fireStructureChanged(); - if (old != null) { - getSelectionModel().setSelectionPaths(old); - } - final EGGroup groupBathy = getGroup(H2dVariableType.BATHYMETRIE, false); - final EGGroup groupCote = getGroup(H2dVariableType.COTE_EAU, false); - if (_mustUseSameAxe && groupBathy != null && groupCote != null) { - _graphe.useOneAxe(new EGAxeVertical[] { groupBathy.getAxeY(), groupCote.getAxeY() }, "Z", null); - } - } - }); - } + private void finishCreation(final EGGraphe _graphe, final boolean _mustUseSameAxe) { + EventQueue.invokeLater(new Runnable() { + public void run() { + final TreePath[] old = getSelectionModel().getSelectionPaths(); + fireStructureChanged(); + if (old != null) { + getSelectionModel().setSelectionPaths(old); + } + final EGGroup groupBathy = getGroup(H2dVariableType.BATHYMETRIE, false); + final EGGroup groupCote = getGroup(H2dVariableType.COTE_EAU, false); + if (_mustUseSameAxe && groupBathy != null && groupCote != null) { + _graphe.useOneAxe(new EGAxeVertical[] { groupBathy.getAxeY(), groupCote.getAxeY() }, "Z", null); + } + } + }); + } - public boolean containsTime() { - return timeModel_ != null; - } + public boolean containsTime() { + return timeModel_ != null; + } - public FudaaCourbeTimeListModel getTimeModel() { - return timeModel_; - } + public FudaaCourbeTimeListModel getTimeModel() { + return timeModel_; + } - public boolean isOutRemoved() { - if (resNode_ != null) { return resNode_.isOutRemoved(); } - return resMesh_.isOutRemoved(); - } + public boolean isOutRemoved() { + if (resNode_ != null) { return resNode_.isOutRemoved(); } + return resMesh_.isOutRemoved(); + } - public boolean isInit() { - if (resNode_ != null) { return resNode_.isInit(); } - return resMesh_.isInit(); - } + public boolean isInit() { + if (resNode_ != null) { return resNode_.isInit(); } + return resMesh_.isInit(); + } - private class UndoRes implements CtuluCommand { - final EfLineIntersectionsResultsMng old_; - final EfLineIntersectionsResultsMng oldMesh_; - final EfLineIntersectionsResultsMng new_; - final EfLineIntersectionsResultsMng newMesh_; - final CtuluUI ui_; + private class UndoRes implements CtuluCommand { + final EfLineIntersectionsResultsMng old_; + final EfLineIntersectionsResultsMng oldMesh_; + final EfLineIntersectionsResultsMng new_; + final EfLineIntersectionsResultsMng newMesh_; + final CtuluUI ui_; - public UndoRes(final EfLineIntersectionsResultsMng _old, final EfLineIntersectionsResultsMng _new, - final EfLineIntersectionsResultsMng _oldMesh, final EfLineIntersectionsResultsMng _newMesh, final CtuluUI _ui) { - super(); - old_ = _old; - ui_ = _ui; - new_ = _new; - oldMesh_ = _oldMesh; - newMesh_ = _newMesh; - } + public UndoRes(final EfLineIntersectionsResultsMng _old, final EfLineIntersectionsResultsMng _new, + final EfLineIntersectionsResultsMng _oldMesh, final EfLineIntersectionsResultsMng _newMesh, final CtuluUI _ui) { + super(); + old_ = _old; + ui_ = _ui; + new_ = _new; + oldMesh_ = _oldMesh; + newMesh_ = _newMesh; + } - public void redo() { - setRes(old_, oldMesh_, ui_); + public void redo() { + setRes(old_, oldMesh_, ui_); - } + } - public void undo() { - setRes(new_, newMesh_, ui_); + public void undo() { + setRes(new_, newMesh_, ui_); - } + } - } + } - protected void sendMessage(final int _nbPointRemoved, final CtuluUI _ui) { - _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("{0} point(s) enlev\xE9(s)", CtuluLibString - .getString(_nbPointRemoved)), true); - } + protected void sendMessage(final int _nbPointRemoved, final CtuluUI _ui) { + _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("{0} point(s) enlev\xE9(s)", CtuluLibString + .getString(_nbPointRemoved)), true); + } - public void inverse(final CtuluCommandContainer _cmd, final CtuluUI _ui) { - final EfLineIntersectionsResultsMng newRes = resNode_ == null ? null : resNode_.inversion(); - final EfLineIntersectionsResultsMng newResMesh = resMesh_ == null ? null : resMesh_.inversion(); - if (_cmd != null) { - _cmd.addCmd(new UndoRes(resNode_, newRes, resMesh_, newResMesh, _ui)); - } - setRes(newRes, newResMesh, _ui); - _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("inversion r\xE9ussie"), true); - } + public void inverse(final CtuluCommandContainer _cmd, final CtuluUI _ui) { + final EfLineIntersectionsResultsMng newRes = resNode_ == null ? null : resNode_.inversion(); + final EfLineIntersectionsResultsMng newResMesh = resMesh_ == null ? null : resMesh_.inversion(); + if (_cmd != null) { + _cmd.addCmd(new UndoRes(resNode_, newRes, resMesh_, newResMesh, _ui)); + } + setRes(newRes, newResMesh, _ui); + _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("inversion r\xE9ussie"), true); + } - public void removeExtPoint(final CtuluCommandContainer _cmd, final CtuluUI _ui) { - if (isOutRemoved()) { - sendMessage(0, _ui); - return; - } - final EfLineIntersectionsResultsMng newRes = resNode_ == null ? null : resNode_.removeExt(); - final EfLineIntersectionsResultsMng newResMesh = resMesh_ == null ? null : resMesh_.removeExt(); - if ((newResMesh == resMesh_) && (newRes == resNode_)) { - sendMessage(0, _ui); - } else { - if (_cmd != null) { - _cmd.addCmd(new UndoRes(resNode_, newRes, resMesh_, newResMesh, _ui)); - } - setRes(newRes, newResMesh, _ui); - _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("extraction r\xE9ussie"), true); - } + public void removeExtPoint(final CtuluCommandContainer _cmd, final CtuluUI _ui) { + if (isOutRemoved()) { + sendMessage(0, _ui); + return; + } + final EfLineIntersectionsResultsMng newRes = resNode_ == null ? null : resNode_.removeExt(); + final EfLineIntersectionsResultsMng newResMesh = resMesh_ == null ? null : resMesh_.removeExt(); + if ((newResMesh == resMesh_) && (newRes == resNode_)) { + sendMessage(0, _ui); + } else { + if (_cmd != null) { + _cmd.addCmd(new UndoRes(resNode_, newRes, resMesh_, newResMesh, _ui)); + } + setRes(newRes, newResMesh, _ui); + _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("extraction r\xE9ussie"), true); + } - } + } - public void extractFrom(final CtuluCommandContainer _cmd, final CtuluUI _ui, final int _i1, final int _i2) { - if (_i1 < _i2) { - final EfLineIntersectionsResultsMng newRes = resNode_ == null ? null : resNode_.extract(_i1, _i2); - final EfLineIntersectionsResultsMng newResMesh = resMesh_ == null ? null : resMesh_.extract(_i1, _i2); - if ((newResMesh == resMesh_) && (newRes == resNode_)) { - _ui.error(CtuluLibString.EMPTY_STRING, MvResource.getS("Nombre de points insuffisants"), true); - } else { - if (_cmd != null) { - _cmd.addCmd(new UndoRes(resNode_, newRes, resMesh_, newResMesh, _ui)); - } - setRes(newRes, newResMesh, _ui); - _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("extraction r\xE9ussie"), true); - } + public void extractFrom(final CtuluCommandContainer _cmd, final CtuluUI _ui, final int _i1, final int _i2) { + if (_i1 < _i2) { + final EfLineIntersectionsResultsMng newRes = resNode_ == null ? null : resNode_.extract(_i1, _i2); + final EfLineIntersectionsResultsMng newResMesh = resMesh_ == null ? null : resMesh_.extract(_i1, _i2); + if ((newResMesh == resMesh_) && (newRes == resNode_)) { + _ui.error(CtuluLibString.EMPTY_STRING, MvResource.getS("Nombre de points insuffisants"), true); + } else { + if (_cmd != null) { + _cmd.addCmd(new UndoRes(resNode_, newRes, resMesh_, newResMesh, _ui)); + } + setRes(newRes, newResMesh, _ui); + _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("extraction r\xE9ussie"), true); + } - } - } + } + } - public void reinitRes(final CtuluCommandContainer _cmd, final CtuluUI _ui) { - if (isInit()) { return; } - final CtuluTaskDelegate task = _ui.createTask(DodicoLib.getS("Recherche intersections")); - task.start(new Runnable() { + public void reinitRes(final CtuluCommandContainer _cmd, final CtuluUI _ui) { + if (isInit()) { return; } + final CtuluTaskDelegate task = _ui.createTask(DodicoLib.getS("Recherche intersections")); + task.start(new Runnable() { - public void run() { - final EfLineIntersectionsResultsMng newResultsNode = resNode_ == null ? null : resNode_.restoreInit(task - .getStateReceiver()); - final EfLineIntersectionsResultsMng newResultsMesh = resMesh_ == null ? null : resMesh_.restoreInit(task - .getStateReceiver()); - if ((newResultsMesh != resMesh_) || (newResultsNode != resNode_)) { - if (_cmd != null) { - _cmd.addCmd(new UndoRes(resNode_, newResultsNode, resMesh_, newResultsMesh, _ui)); - } - setRes(newResultsNode, newResultsMesh, _ui); - _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("Initialisation r\xE9ussie"), true); - } + public void run() { + final EfLineIntersectionsResultsMng newResultsNode = resNode_ == null ? null : resNode_.restoreInit(task + .getStateReceiver()); + final EfLineIntersectionsResultsMng newResultsMesh = resMesh_ == null ? null : resMesh_.restoreInit(task + .getStateReceiver()); + if ((newResultsMesh != resMesh_) || (newResultsNode != resNode_)) { + if (_cmd != null) { + _cmd.addCmd(new UndoRes(resNode_, newResultsNode, resMesh_, newResultsMesh, _ui)); + } + setRes(newResultsNode, newResultsMesh, _ui); + _ui.message(CtuluLibString.EMPTY_STRING, MvResource.getS("Initialisation r\xE9ussie"), true); + } - } + } - }); + }); - } + } - public void varRemoved(final CtuluVariable[] _var) { - if (_var != null) { - for (int i = _var.length - 1; i >= 0; i--) { - final EGGroup g = getGroup(_var[i], false); - ... [truncated message content] |
From: <cla...@us...> - 2008-10-16 14:59:02
|
Revision: 4074 http://fudaa.svn.sourceforge.net/fudaa/?rev=4074&view=rev Author: clavreul Date: 2008-10-16 14:58:47 +0000 (Thu, 16 Oct 2008) Log Message: ----------- taskprepro v5p8 Added Paths: ----------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoEstel2dv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoPostel3dv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoSisyphev5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoSpartacus2dv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoStbtelv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoSubief2dv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoSubief3dv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoTelemac2dv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoTelemac3dv5p8.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoTomawacv5p8.java Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java 2008-10-16 14:58:47 UTC (rev 4074) @@ -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 ... [truncated message content] |
From: <emm...@us...> - 2008-10-16 14:01:12
|
Revision: 4073 http://fudaa.svn.sourceforge.net/fudaa/?rev=4073&view=rev Author: emmanuel_martin Date: 2008-10-16 14:01:02 +0000 (Thu, 16 Oct 2008) Log Message: ----------- am?\195?\169liorations et corrections de bugs dans le wizard du modeleur. Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluLibArray.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelFilterAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISGeometryFactory.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISLib.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/test/org/fudaa/ctulu/gis/TestGISDataModelAttributAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesGEOWriter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/ReflucadBERReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/ReflucadPROReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/ReflucadSEMReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinNewReaderInfo.java branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SinusxReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImport.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/FSigExportImportAttributesMapper.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerExporter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoadResult.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderCsv.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderGIS.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderGrid.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderInp.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderReflucadBER.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderReflucadPRO.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderReflucadSEM.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderRefluxRefondeResult.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderRubarCox.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderRubarInx.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderRubarSem.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderRubarSt.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderSerafin.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderSinusX.java Added Paths: ----------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeSubstitutionAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligneAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointToMultiPointAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolygoneToMultiPointAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToMultiPointAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToPolygoneAdapter.java Removed Paths: ------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointMultiPointAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolygoneToMultiPoint.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToMultiPoint.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToPolygone.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluLibArray.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluLibArray.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluLibArray.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -477,7 +477,7 @@ * * @param _array le tableau a parcourir * @param _objectToFound l'entier cherche - * @return l'index de l'objet dans le tableau. null si non trouve + * @return l'index de l'objet dans le tableau. -1 si non trouve */ public static int findObjectEgalEgal(final Object[] _array, final Object _objectToFound) { if ((_array == null) || (_objectToFound == null)) { Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -56,6 +56,10 @@ public GISAttributeBoolean(final String _name) { super(CtuluValueEditorDefaults.STRING_EDITOR, _name); } + + public GISAttributeBoolean(final String _name, final boolean _isAtomic) { + super(CtuluValueEditorDefaults.STRING_EDITOR, _name, _isAtomic); + } public final Class getDataClass() { return Boolean.class; Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -91,6 +91,21 @@ return "ATTRIBUTE_ETAT_GEOM"; } + protected Object createGlobalValues(Object _initValues) { + if (_initValues instanceof Object[]) { + // Si au moins une des valeurs est "modifi\xE9", on retourne "modifi\xE9". + boolean modifie=false; + int i=-1; + while (!modifie&&++i<((Object[])_initValues).length) + modifie=((Object[])_initValues)[i]==ATT_VAL_ETAT_MODI; + if (modifie) + _initValues=ATT_VAL_ETAT_MODI; + else + _initValues=ATT_VAL_ETAT_ORIG; + } + return super.createGlobalValues(_initValues); + } + public boolean isEditable() { return true; } Deleted: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -1,227 +0,0 @@ -/* - * @creation 7 oct. 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.ctulu.gis; - -import java.util.ArrayList; -import java.util.List; - -import org.fudaa.ctulu.CtuluLibArray; -import org.fudaa.ctulu.ProgressionInterface; - -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; - -/** - * Cet Adapter permet l'ajout d'attributs au DataModel. - * @author Emmanuel MARTIN - * @version $Id$ - */ -public class GISDataModelAttributAdapter implements GISDataModel{ - - // Le model adapt\xE9 - private GISDataModel dataModel_; - // Les nouveaux attributs - private List<GISAttributeInterface> newAttr_; - private List<Object[]> newValues_; - - public GISDataModelAttributAdapter(GISDataModel _dataModel){ - dataModel_ = _dataModel; - newAttr_ = new ArrayList<GISAttributeInterface>(1); - newValues_ = new ArrayList<Object[]>(1); - } - - /** - * Ajout un attribut pour tout les \xE9l\xE9ments si cet attribut n'existe pas d\xE9j\xE0. - * L'atomicit\xE9 (ou la globalit\xE9) de l'attribut est respect\xE9. - * @param _attr l'attribut a ajouter - * @param _value une valeur unique qui sera dupliquer pour toutes les g\xE9om\xE9tries - * @return 0 si l'attribut existe d\xE9j\xE0 (il n'est pas remplac\xE9) - * -2 si _attr ou _value sont null - */ - public int addAttribut(GISAttributeInterface _attr, Object _value){ - if(_attr==null||_value==null) - return -2; - if (dataModel_.getIndiceOf(_attr)==-1 && !newAttr_.contains(_attr)) { - newAttr_.add(_attr); - // Attribut atomique - if (_attr.isAtomicValue()) { - Object[] tmp=new Object[dataModel_.getNumGeometries()]; - for (int i=0; i<tmp.length; i++) - tmp[i]=_attr.createDataForGeom(_value, dataModel_.getGeometry(i).getNumPoints()); - newValues_.add(tmp); - } - // Attribut global - else { - Object[] tmp=new Object[dataModel_.getNumGeometries()]; - for (int i=0; i<tmp.length; i++) - tmp[i]=_value; - newValues_.add(tmp); - } - return 1; - } - else - return 0; - } - - /** - * Ajout un attribut pour tout les \xE9l\xE9ments si cet attribut n'existe pas d\xE9j\xE0. - * si _attr est un attribut atomique, chaque valeur sera dupliqu\xE9 pour - * chaque sommet de la g\xE9om\xE9trie. - * @param _attr l'attribut a ajouter - * @param _values une valeur pour chaque g\xE9om\xE9trie. - * @return 0 si l'attribut existe d\xE9j\xE0 (il n'est pas remplac\xE9) - * -1 en cas de tableau _values de mauvaise taille - * -2 si _attr ou _values sont null - */ - public int addAttribut(GISAttributeInterface _attr, Object[] _values){ - if(_attr==null||_values==null) - return -2; - if(dataModel_.getIndiceOf(_attr) == -1 && !newAttr_.contains(_attr)){ - if(_values.length != dataModel_.getNumGeometries()) - return -1; - // Attribut atomique - if (_attr.isAtomicValue()) { - Object[] tmp=new Object[dataModel_.getNumGeometries()]; - for (int i=0; i<tmp.length; i++) - tmp[i]=_attr.createDataForGeom(_values[i], dataModel_.getGeometry(i).getNumPoints()); - newAttr_.add(_attr); - newValues_.add(tmp); - } - // Attribut global - else { - newAttr_.add(_attr); - newValues_.add(_values); - } - return 1; - } - else - return 0; - } - - /** - * Ajout un attribut pour tout les \xE9l\xE9ments si cet attribut n'existe pas d\xE9j\xE0. - * Cette m\xE9thode n'est d\xE9finie que pour les attributs atomiques. - * @param _attr l'attribut a ajouter - * @param _values une valeur pour chaque sommet de chaque g\xE9om\xE9trie. - * @return 0 si l'attribut existe d\xE9j\xE0 (il n'est pas remplac\xE9) - * -1 en cas de tableau _values de mauvaise taille - * -2 si _attr ou _values sont null - * -3 si l'attribut n'est pas atomique - */ - public int addAttribut(GISAttributeInterface _attr, Object[][] _values){ - if(_attr==null||_values==null) - return -2; - if (_attr.isAtomicValue()) - if (dataModel_.getIndiceOf(_attr)==-1 && !newAttr_.contains(_attr)) { - if (_values.length!=dataModel_.getNumGeometries()) - return -1; - // Attribut atomique - Object[] tmp=new Object[dataModel_.getNumGeometries()]; - for (int i=0; i<tmp.length; i++){ - if(_values[i].length != dataModel_.getGeometry(i).getNumPoints()) - return -1; - tmp[i]=_attr.createDataForGeom(_values[i], _values[i].length); - } - newAttr_.add(_attr); - newValues_.add(tmp); - return 1; - } - else - return 0; - else - return -3; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) - */ - public GISAttributeInterface getAttribute(int att) { - if(att<0) - return null; - if (dataModel_.getNbAttributes() > att) - return dataModel_.getAttribute(att); - else if(newAttr_.size() > att - dataModel_.getNbAttributes()) - return newAttr_.get(att - dataModel_.getNbAttributes()); - else return null; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) - */ - public double getDoubleValue(int att, int geom) { - if(att>=0&&geom>=0){ - if (dataModel_.getNbAttributes() > att) - return dataModel_.getDoubleValue(att, geom); - else if(newAttr_.size() > att - dataModel_.getNbAttributes()) - return (Double)newValues_.get(att)[geom]; - else return 0; - } - return 0; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() - */ - public Envelope getEnvelopeInternal() { - return dataModel_.getEnvelopeInternal(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) - */ - public Geometry getGeometry(int geom) { - if(geom<0||geom>=getNumGeometries()) - return null; - return dataModel_.getGeometry(geom); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) - */ - public int getIndiceOf(GISAttributeInterface _att) { - if(dataModel_.getIndiceOf(_att) != -1) - return dataModel_.getIndiceOf(_att); - else if(CtuluLibArray.findObjectEgalEgal(newAttr_, _att)!=-1) - return dataModel_.getNbAttributes()+CtuluLibArray.findObjectEgalEgal(newAttr_, _att); - else return -1; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() - */ - public int getNbAttributes() { - return dataModel_.getNbAttributes()+newAttr_.size(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() - */ - public int getNumGeometries() { - return dataModel_.getNumGeometries(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) - */ - public Object getValue(int att, int geom) { - if (att<0||geom<0) - return null; - if (dataModel_.getNbAttributes()>att&&geom<dataModel_.getNumGeometries()) - return dataModel_.getValue(att, geom); - else if (newAttr_.size()>att-dataModel_.getNbAttributes()&&geom<dataModel_.getNumGeometries()) - return newValues_.get(att-dataModel_.getNbAttributes())[geom]; - return null; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) - */ - public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { - dataModel_.preload(_att, _prog); - } -} Deleted: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -1,196 +0,0 @@ -/* - * @creation 14 oct. 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.ctulu.gis; - -import java.util.HashMap; -import java.util.Map; - -import org.fudaa.ctulu.ProgressionInterface; - -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; - -/** - * Cette adapter permet de substituer des attributs existant par d'autre. - * Par exemple, me model poss\xE8de deux attributs : V1 (type double) et Z - * (type double), l'adapter permet de substituer V& \xE0 Z. Ainsi toutes les - * requ\xEAtes sur Z seront redirig\xE9es sur V1. - * Les deux attributs doivent pr\xE9alablement exist\xE9s, avoir des types de valeur - * identique et \xEAtre de m\xEAme niveau (global ou atomique). - * A not\xE9 que se ne sont que les valeurs qui sont substituer. En cas d'appelle - * \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont GISAttributInterface - * sera toujours renvoy\xE9 comme avant. - * @author Emmanuel MARTIN - * @version $Id:$ - */ -public class GISDataModelAttributSubstitution implements GISDataModel { - - private final GISDataModel model_; - /** - * Table contenant les substitutions d'attributs \xE0 faire sur le model. - * Pour des raisons de performence, la substitution est m\xE9moris\xE9 par - * l'index des attributs. - */ - private final HashMap<Integer, Integer> substitutionTable_; - - /** - * Cette adapter permet de substituer des attributs existant par d'autre. Par - * exemple, me model poss\xE8de deux attributs : V1 (type double) et Z (type - * double), l'adapter permet de substituer V1 \xE0 Z. Ainsi toutes les requ\xEAtes - * sur Z seront redirig\xE9es sur V1. Les deux attributs doivent pr\xE9alablement - * exist\xE9s et avoir des types de valeur identique. Si les attributs sont de - * niveau (global ou atomique) diff\xE9rent, l'adapter converti les valeurs - * en utilisant la m\xE9thod createDataForGeom. - * A not\xE9 que se ne sont que les valeurs qui sont substituer. En - * cas d'appelle \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont - * GISAttributInterface sera toujours renvoy\xE9 comme avant. - * - * - * @param _model - * le model \xE0 adaoter - * @param _substitutionTable - * cette table contient les substitutions \xE0 faire. Une substitution - * est un tableau \xE0 deux \xE9l\xE9ments : le premier l'attribut a - * substituer et le second l'attribut par lequel le substituer. - * _substitutionTable est donc un tableau de tableau \xE0 deux \xE9l\xE9ments. - */ - public GISDataModelAttributSubstitution(GISDataModel _model, GISAttributeInterface[][] _substitutionTable){ - if(_substitutionTable==null||_model==null) - throw new IllegalArgumentException("_substitutionTable et _model ne doivent pas \xEAtre null."); - model_=_model; - substitutionTable_=new HashMap<Integer, Integer>(); - // Verification des substitutions - for(int i=0;i<_substitutionTable.length;i++){ - if(_substitutionTable[i].length!=2) - throw new IllegalArgumentException("Une substitution est un tableau \xE0 deux \xE9l\xE9ments, ni plus, ni moins."); - if(_substitutionTable[i][0].getDataClass()!=_substitutionTable[i][1].getDataClass()) - throw new IllegalArgumentException("Les deux substitutions doivent avoir des valeurs de m\xEAme type."); - if(model_.getIndiceOf(_substitutionTable[i][0])==-1) - throw new IllegalArgumentException(_substitutionTable[i][0].getID() + "n'est pas dans le model."); - if(model_.getIndiceOf(_substitutionTable[i][1])==-1) - throw new IllegalArgumentException(_substitutionTable[i][1].getID() + "n'est pas dans le model."); - // Ajout de la substitution - substitutionTable_.put(model_.getIndiceOf(_substitutionTable[i][0]), model_.getIndiceOf(_substitutionTable[i][1])); - } - } - - /** - * Cette adapter permet de substituer des attributs existant par d'autre. Par - * exemple, me model poss\xE8de deux attributs : V1 (type double) et Z (type - * double), l'adapter permet de substituer V& \xE0 Z. Ainsi toutes les requ\xEAtes - * sur Z seront redirig\xE9es sur V1. Les deux attributs doivent pr\xE9alablement - * exist\xE9s, avoir des types de valeur identique et \xEAtre de m\xEAme niveau (global - * ou atomique). - * A not\xE9 que se ne sont que les valeurs qui sont substituer. En - * cas d'appelle \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont - * GISAttributInterface sera toujours renvoy\xE9 comme avant. - * - * - * @param _model - * le model \xE0 adaoter - * @param _substitutionTable - * cette map contient les substitutions \xE0 faire. Le premier l'attribut - * a substituer et le second l'attribut par lequel le substituer. - */ - public GISDataModelAttributSubstitution(GISDataModel _model, Map<GISAttributeInterface, GISAttributeInterface> _substitutionTable){ - if(_substitutionTable==null||_model==null) - throw new IllegalArgumentException("_substitutionTable et _model ne doivent pas \xEAtre null."); - model_=_model; - substitutionTable_=new HashMap<Integer, Integer>(); - // Verification des substitutions - for(Map.Entry<GISAttributeInterface, GISAttributeInterface> entry:_substitutionTable.entrySet()){ - if(entry.getKey().getDataClass()!=entry.getValue().getDataClass()) - throw new IllegalArgumentException("Les deux substitutions doivent avoir des valeurs de m\xEAme type."); - if(model_.getIndiceOf(entry.getKey())==-1) - throw new IllegalArgumentException(entry.getKey().getID() + "n'est pas dans le model."); - if(model_.getIndiceOf(entry.getValue())==-1) - throw new IllegalArgumentException(entry.getValue().getID() + "n'est pas dans le model."); - // Ajout de la substitution - substitutionTable_.put(model_.getIndiceOf(entry.getKey()), model_.getIndiceOf(entry.getValue())); - } - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) - */ - public GISAttributeInterface getAttribute(int _att) { - return model_.getAttribute(_att); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) - */ - public double getDoubleValue(int _att, int _geom) { - if (substitutionTable_.containsKey(_att)) - return model_.getDoubleValue(substitutionTable_.get(_att), _geom); - else - return model_.getDoubleValue(_att, _geom); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() - */ - public Envelope getEnvelopeInternal() { - return model_.getEnvelopeInternal(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) - */ - public Geometry getGeometry(int _geom) { - return model_.getGeometry(_geom); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) - */ - public int getIndiceOf(GISAttributeInterface _att) { - return model_.getIndiceOf(_att); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() - */ - public int getNbAttributes() { - return model_.getNbAttributes(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() - */ - public int getNumGeometries() { - return model_.getNumGeometries(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) - */ - public Object getValue(int _att, int _geom) { - if (substitutionTable_.containsKey(_att)) - if (getAttribute(_att).isAtomicValue()!=getAttribute(substitutionTable_.get(_att)).isAtomicValue()) { - Object value; - if (getAttribute(substitutionTable_.get(_att)).isAtomicValue()) - value=((GISAttributeModel)model_.getValue(substitutionTable_.get(_att), _geom)).getAverage(); - else - value=model_.getValue(substitutionTable_.get(_att), _geom); - return model_.getAttribute(_att).createDataForGeom(value, model_.getGeometry(_geom).getNumPoints()); - } - else - return model_.getValue(substitutionTable_.get(_att), _geom); - else - return model_.getValue(_att, _geom); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) - */ - public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { - model_.preload(_att, _prog); - } - -} Copied: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeAdapter.java (from rev 4061, branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java) =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeAdapter.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeAdapter.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -0,0 +1,227 @@ +/* + * @creation 7 oct. 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.ctulu.gis; + +import java.util.ArrayList; +import java.util.List; + +import org.fudaa.ctulu.CtuluLibArray; +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Cet Adapter permet l'ajout d'attributs au DataModel. + * @author Emmanuel MARTIN + * @version $Id$ + */ +public class GISDataModelAttributeAdapter implements GISDataModel{ + + // Le model adapt\xE9 + private GISDataModel dataModel_; + // Les nouveaux attributs + private List<GISAttributeInterface> newAttr_; + private List<Object[]> newValues_; + + public GISDataModelAttributeAdapter(GISDataModel _dataModel){ + dataModel_ = _dataModel; + newAttr_ = new ArrayList<GISAttributeInterface>(1); + newValues_ = new ArrayList<Object[]>(1); + } + + /** + * Ajout un attribut pour tout les \xE9l\xE9ments si cet attribut n'existe pas d\xE9j\xE0. + * L'atomicit\xE9 (ou la globalit\xE9) de l'attribut est respect\xE9. + * @param _attr l'attribut a ajouter + * @param _value une valeur unique qui sera dupliquer pour toutes les g\xE9om\xE9tries + * @return 0 si l'attribut existe d\xE9j\xE0 (il n'est pas remplac\xE9) + * -2 si _attr ou _value sont null + */ + public int addAttribut(GISAttributeInterface _attr, Object _value){ + if(_attr==null||_value==null) + return -2; + if (dataModel_.getIndiceOf(_attr)==-1 && !newAttr_.contains(_attr)) { + newAttr_.add(_attr); + // Attribut atomique + if (_attr.isAtomicValue()) { + Object[] tmp=new Object[dataModel_.getNumGeometries()]; + for (int i=0; i<tmp.length; i++) + tmp[i]=_attr.createDataForGeom(_value, dataModel_.getGeometry(i).getNumPoints()); + newValues_.add(tmp); + } + // Attribut global + else { + Object[] tmp=new Object[dataModel_.getNumGeometries()]; + for (int i=0; i<tmp.length; i++) + tmp[i]=_value; + newValues_.add(tmp); + } + return 1; + } + else + return 0; + } + + /** + * Ajout un attribut pour tout les \xE9l\xE9ments si cet attribut n'existe pas d\xE9j\xE0. + * si _attr est un attribut atomique, chaque valeur sera dupliqu\xE9 pour + * chaque sommet de la g\xE9om\xE9trie. + * @param _attr l'attribut a ajouter + * @param _values une valeur pour chaque g\xE9om\xE9trie. + * @return 0 si l'attribut existe d\xE9j\xE0 (il n'est pas remplac\xE9) + * -1 en cas de tableau _values de mauvaise taille + * -2 si _attr ou _values sont null + */ + public int addAttribut(GISAttributeInterface _attr, Object[] _values){ + if(_attr==null||_values==null) + return -2; + if(dataModel_.getIndiceOf(_attr) == -1 && !newAttr_.contains(_attr)){ + if(_values.length != dataModel_.getNumGeometries()) + return -1; + // Attribut atomique + if (_attr.isAtomicValue()) { + Object[] tmp=new Object[dataModel_.getNumGeometries()]; + for (int i=0; i<tmp.length; i++) + tmp[i]=_attr.createDataForGeom(_values[i], dataModel_.getGeometry(i).getNumPoints()); + newAttr_.add(_attr); + newValues_.add(tmp); + } + // Attribut global + else { + newAttr_.add(_attr); + newValues_.add(_values); + } + return 1; + } + else + return 0; + } + + /** + * Ajout un attribut pour tout les \xE9l\xE9ments si cet attribut n'existe pas d\xE9j\xE0. + * Cette m\xE9thode n'est d\xE9finie que pour les attributs atomiques. + * @param _attr l'attribut a ajouter + * @param _values une valeur pour chaque sommet de chaque g\xE9om\xE9trie. + * @return 0 si l'attribut existe d\xE9j\xE0 (il n'est pas remplac\xE9) + * -1 en cas de tableau _values de mauvaise taille + * -2 si _attr ou _values sont null + * -3 si l'attribut n'est pas atomique + */ + public int addAttribut(GISAttributeInterface _attr, Object[][] _values){ + if(_attr==null||_values==null) + return -2; + if (_attr.isAtomicValue()) + if (dataModel_.getIndiceOf(_attr)==-1 && !newAttr_.contains(_attr)) { + if (_values.length!=dataModel_.getNumGeometries()) + return -1; + // Attribut atomique + Object[] tmp=new Object[dataModel_.getNumGeometries()]; + for (int i=0; i<tmp.length; i++){ + if(_values[i].length != dataModel_.getGeometry(i).getNumPoints()) + return -1; + tmp[i]=_attr.createDataForGeom(_values[i], _values[i].length); + } + newAttr_.add(_attr); + newValues_.add(tmp); + return 1; + } + else + return 0; + else + return -3; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int att) { + if(att<0) + return null; + if (dataModel_.getNbAttributes() > att) + return dataModel_.getAttribute(att); + else if(newAttr_.size() > att - dataModel_.getNbAttributes()) + return newAttr_.get(att - dataModel_.getNbAttributes()); + else return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int att, int geom) { + if(att>=0&&geom>=0){ + if (dataModel_.getNbAttributes() > att) + return dataModel_.getDoubleValue(att, geom); + else if(newAttr_.size() > att - dataModel_.getNbAttributes()) + return (Double)newValues_.get(att)[geom]; + else return 0; + } + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return dataModel_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int geom) { + if(geom<0||geom>=getNumGeometries()) + return null; + return dataModel_.getGeometry(geom); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + if(dataModel_.getIndiceOf(_att) != -1) + return dataModel_.getIndiceOf(_att); + else if(CtuluLibArray.findObjectEgalEgal(newAttr_, _att)!=-1) + return dataModel_.getNbAttributes()+CtuluLibArray.findObjectEgalEgal(newAttr_, _att); + else return -1; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return dataModel_.getNbAttributes()+newAttr_.size(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return dataModel_.getNumGeometries(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int att, int geom) { + if (att<0||geom<0) + return null; + if (dataModel_.getNbAttributes()>att&&geom<dataModel_.getNumGeometries()) + return dataModel_.getValue(att, geom); + else if (newAttr_.size()>att-dataModel_.getNbAttributes()&&geom<dataModel_.getNumGeometries()) + return newValues_.get(att-dataModel_.getNbAttributes())[geom]; + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + dataModel_.preload(_att, _prog); + } +} Copied: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeSubstitutionAdapter.java (from rev 4061, branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java) =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeSubstitutionAdapter.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributeSubstitutionAdapter.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -0,0 +1,196 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.HashMap; +import java.util.Map; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Cette adapter permet de substituer des attributs existant par d'autre. + * Par exemple, me model poss\xE8de deux attributs : V1 (type double) et Z + * (type double), l'adapter permet de substituer V& \xE0 Z. Ainsi toutes les + * requ\xEAtes sur Z seront redirig\xE9es sur V1. + * Les deux attributs doivent pr\xE9alablement exist\xE9s, avoir des types de valeur + * identique et \xEAtre de m\xEAme niveau (global ou atomique). + * A not\xE9 que se ne sont que les valeurs qui sont substituer. En cas d'appelle + * \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont GISAttributInterface + * sera toujours renvoy\xE9 comme avant. + * @author Emmanuel MARTIN + * @version $Id$ + */ +public class GISDataModelAttributeSubstitutionAdapter implements GISDataModel { + + private final GISDataModel model_; + /** + * Table contenant les substitutions d'attributs \xE0 faire sur le model. + * Pour des raisons de performence, la substitution est m\xE9moris\xE9 par + * l'index des attributs. + */ + private final HashMap<Integer, Integer> substitutionTable_; + + /** + * Cette adapter permet de substituer des attributs existant par d'autre. Par + * exemple, me model poss\xE8de deux attributs : V1 (type double) et Z (type + * double), l'adapter permet de substituer V1 \xE0 Z. Ainsi toutes les requ\xEAtes + * sur Z seront redirig\xE9es sur V1. Les deux attributs doivent pr\xE9alablement + * exist\xE9s et avoir des types de valeur identique. Si les attributs sont de + * niveau (global ou atomique) diff\xE9rent, l'adapter converti les valeurs + * en utilisant la m\xE9thod createDataForGeom. + * A not\xE9 que se ne sont que les valeurs qui sont substituer. En + * cas d'appelle \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont + * GISAttributInterface sera toujours renvoy\xE9 comme avant. + * + * + * @param _model + * le model \xE0 adaoter + * @param _substitutionTable + * cette table contient les substitutions \xE0 faire. Une substitution + * est un tableau \xE0 deux \xE9l\xE9ments : le premier l'attribut a + * substituer et le second l'attribut par lequel le substituer. + * _substitutionTable est donc un tableau de tableau \xE0 deux \xE9l\xE9ments. + */ + public GISDataModelAttributeSubstitutionAdapter(GISDataModel _model, GISAttributeInterface[][] _substitutionTable){ + if(_substitutionTable==null||_model==null) + throw new IllegalArgumentException("_substitutionTable et _model ne doivent pas \xEAtre null."); + model_=_model; + substitutionTable_=new HashMap<Integer, Integer>(); + // Verification des substitutions + for(int i=0;i<_substitutionTable.length;i++){ + if(_substitutionTable[i].length!=2) + throw new IllegalArgumentException("Une substitution est un tableau \xE0 deux \xE9l\xE9ments, ni plus, ni moins."); + if(_substitutionTable[i][0].getDataClass()!=_substitutionTable[i][1].getDataClass()) + throw new IllegalArgumentException("Les deux substitutions doivent avoir des valeurs de m\xEAme type."); + if(model_.getIndiceOf(_substitutionTable[i][0])==-1) + throw new IllegalArgumentException(_substitutionTable[i][0].getID() + "n'est pas dans le model."); + if(model_.getIndiceOf(_substitutionTable[i][1])==-1) + throw new IllegalArgumentException(_substitutionTable[i][1].getID() + "n'est pas dans le model."); + // Ajout de la substitution + substitutionTable_.put(model_.getIndiceOf(_substitutionTable[i][0]), model_.getIndiceOf(_substitutionTable[i][1])); + } + } + + /** + * Cette adapter permet de substituer des attributs existant par d'autre. Par + * exemple, me model poss\xE8de deux attributs : V1 (type double) et Z (type + * double), l'adapter permet de substituer V& \xE0 Z. Ainsi toutes les requ\xEAtes + * sur Z seront redirig\xE9es sur V1. Les deux attributs doivent pr\xE9alablement + * exist\xE9s, avoir des types de valeur identique et \xEAtre de m\xEAme niveau (global + * ou atomique). + * A not\xE9 que se ne sont que les valeurs qui sont substituer. En + * cas d'appelle \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont + * GISAttributInterface sera toujours renvoy\xE9 comme avant. + * + * + * @param _model + * le model \xE0 adaoter + * @param _substitutionTable + * cette map contient les substitutions \xE0 faire. Le premier l'attribut + * a substituer et le second l'attribut par lequel le substituer. + */ + public GISDataModelAttributeSubstitutionAdapter(GISDataModel _model, Map<GISAttributeInterface, GISAttributeInterface> _substitutionTable){ + if(_substitutionTable==null||_model==null) + throw new IllegalArgumentException("_substitutionTable et _model ne doivent pas \xEAtre null."); + model_=_model; + substitutionTable_=new HashMap<Integer, Integer>(); + // Verification des substitutions + for(Map.Entry<GISAttributeInterface, GISAttributeInterface> entry:_substitutionTable.entrySet()){ + if(entry.getKey().getDataClass()!=entry.getValue().getDataClass()) + throw new IllegalArgumentException("Les deux substitutions doivent avoir des valeurs de m\xEAme type."); + if(model_.getIndiceOf(entry.getKey())==-1) + throw new IllegalArgumentException(entry.getKey().getID() + "n'est pas dans le model."); + if(model_.getIndiceOf(entry.getValue())==-1) + throw new IllegalArgumentException(entry.getValue().getID() + "n'est pas dans le model."); + // Ajout de la substitution + substitutionTable_.put(model_.getIndiceOf(entry.getKey()), model_.getIndiceOf(entry.getValue())); + } + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if (substitutionTable_.containsKey(_att)) + return model_.getDoubleValue(substitutionTable_.get(_att), _geom); + else + return model_.getDoubleValue(_att, _geom); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + return model_.getGeometry(_geom); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return model_.getNumGeometries(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if (substitutionTable_.containsKey(_att)) + if (getAttribute(_att).isAtomicValue()!=getAttribute(substitutionTable_.get(_att)).isAtomicValue()) { + Object value; + if (getAttribute(substitutionTable_.get(_att)).isAtomicValue()) + value=((GISAttributeModel)model_.getValue(substitutionTable_.get(_att), _geom)).getAverage(); + else + value=model_.getValue(substitutionTable_.get(_att), _geom); + return model_.getAttribute(_att).createDataForGeom(value, model_.getGeometry(_geom).getNumPoints()); + } + else + return model_.getValue(substitutionTable_.get(_att), _geom); + else + return model_.getValue(_att, _geom); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } + +} Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelFilterAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelFilterAdapter.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelFilterAdapter.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -179,9 +179,8 @@ public Object getValue(final int _idxAtt, final int _idxGeom) { final int idx = getRealAttributIndex(_idxAtt); - if (idx < 0 || idx >= model_.getNbAttributes()) { + if (idx < 0 || idx >= model_.getNbAttributes()) return null; - } return model_.getValue(idx, getRealGeometryIndex(_idxGeom)); } Deleted: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -1,125 +0,0 @@ -/* - * @creation 14 oct. 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.ctulu.gis; - -import java.util.ArrayList; -import java.util.HashMap; - -import org.fudaa.ctulu.ProgressionInterface; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.LinearRing; -import com.vividsolutions.jts.geom.MultiPoint; - -/** - * Cette classe convertie les mulitpoints en polyligne. Les g\xE9om\xE9tries faisant - * partie du model ne pouvant \xEAtre converties (soit parce que se ne sont pas des - * multipoint soit parce qu'il n'y a pas assez de points pour faire la conversion) - * deviennent invisible. - * - * @author Emmanuel MARTIN - * @version $Id:$ - */ -public class GISDataModelMultiPointToPolyligne implements GISDataModel { - - private final GISDataModel model_; - /** Table de translation d'indices des g\xE9om\xE9tries. */ - private final ArrayList<Integer> translationTable_; - /** Table cache des polylignes cr\xE9es.*/ - private final HashMap<Integer, LineString> cachePolyligne_; - - public GISDataModelMultiPointToPolyligne(GISDataModel _model){ - if(_model==null) - throw new IllegalArgumentException("_model ne doit pas \xEAtre null."); - translationTable_=new ArrayList<Integer>(); - cachePolyligne_=new HashMap<Integer, LineString>(); - model_=_model; - // Construction de la table de translation - for(int i=0;i<model_.getNumGeometries();i++) - if(model_.getGeometry(i) instanceof MultiPoint && model_.getGeometry(i).getNumPoints() >= 2) - translationTable_.add(i); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) - */ - public GISAttributeInterface getAttribute(int _att) { - return model_.getAttribute(_att); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) - */ - public double getDoubleValue(int _att, int _geom) { - if(_geom>0&&_geom<translationTable_.size()) - return getDoubleValue(_att, translationTable_.get(_geom)); - return 0; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() - */ - public Envelope getEnvelopeInternal() { - return model_.getEnvelopeInternal(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) - */ - public Geometry getGeometry(int _geom) { - if (_geom>=0&&_geom<translationTable_.size()) { - if (!cachePolyligne_.containsKey(_geom)) { - Coordinate[] coordinates=model_.getGeometry(translationTable_.get(_geom)).getCoordinates(); - // Cr\xE9ation de la polyligne - cachePolyligne_.put(_geom, GISGeometryFactory.INSTANCE.createLineString(coordinates)); - } - return cachePolyligne_.get(_geom); - } - return null; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) - */ - public int getIndiceOf(GISAttributeInterface _att) { - return model_.getIndiceOf(_att); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() - */ - public int getNbAttributes() { - return model_.getNbAttributes(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() - */ - public int getNumGeometries() { - return translationTable_.size(); - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) - */ - public Object getValue(int _att, int _geom) { - if(_geom>0&&_geom<translationTable_.size()) - return model_.getValue(_att, translationTable_.get(_geom)); - return null; - } - - /* (non-Javadoc) - * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) - */ - public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { - model_.preload(_att, _prog); - } -} Copied: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligneAdapter.java (from rev 4061, branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java) =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligneAdapter.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligneAdapter.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -0,0 +1,121 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.MultiPoint; + +/** + * Cette classe convertie les mulitpoints en polylignes. Les g\xE9om\xE9tries faisant + * partie du model ne pouvant \xEAtre converties (soit parce que se ne sont pas des + * multipoints soit parce qu'il n'y a pas assez de points pour faire la conversion) + * deviennent invisibles. + * + * @author Emmanuel MARTIN + * @version $Id$ + */ +public class GISDataModelMultiPointToPolyligneAdapter implements GISDataModel { + + private final GISDataModel model_; + /** Table de translation d'indices des g\xE9om\xE9tries. */ + private final ArrayList<Integer> translationTable_; + /** Table cache des polylignes cr\xE9es.*/ + private final HashMap<Integer, GISPolyligne> cachePolyligne_; + + public GISDataModelMultiPointToPolyligneAdapter(GISDataModel _model){ + if(_model==null) + throw new IllegalArgumentException("_model ne doit pas \xEAtre null."); + translationTable_=new ArrayList<Integer>(); + cachePolyligne_=new HashMap<Integer, GISPolyligne>(); + model_=_model; + // Construction de la table de translation + for(int i=0;i<model_.getNumGeometries();i++) + if(model_.getGeometry(i) instanceof GISMultiPoint && model_.getGeometry(i).getNumPoints() >= 2) + translationTable_.add(i); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return getDoubleValue(_att, translationTable_.get(_geom)); + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + if (_geom>=0&&_geom<translationTable_.size()) { + if (!cachePolyligne_.containsKey(_geom)) + cachePolyligne_.put(_geom, GISLib.toPolyligne(((GISMultiPoint) model_.getGeometry(translationTable_.get(_geom))).getCoordinateSequence())); + return cachePolyligne_.get(_geom); + } + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return translationTable_.size(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if(_geom>=0&&_geom<translationTable_.size()) + return model_.getValue(_att, translationTable_.get(_geom)); + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } +} Deleted: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointMultiPointAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointMultiPointAdapter.java 2008-10-16 13:40:50 UTC (rev 4072) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointMultiPointAdapter.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -1,141 +0,0 @@ -/* - * @creation 8 juin 2005 - * @modification $Date: 2007-04-16 16:33:52 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.ctulu.gis; - -import java.util.ArrayList; -import java.util.HashMap; - -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.Point; - -import org.fudaa.ctulu.CtuluLib; -import org.fudaa.ctulu.CtuluLibArray; -import org.fudaa.ctulu.ProgressionInterface; - -/** - * Un mod\xE8le pour adapter un modele de points vers un mod\xE8le de multipoints. - * Lors de ce passage, si l'attribut ATT_NUM_BLOC existe, alors il est utilis\xE9 pour g\xE9n\xE9rer les multipoints. - * Sinon, un seul multipoint est cr\xE9\xE9. - * A priori, tous les attributs des points sont globaux. Ils deviennent atomiques. - * - * @author Bertrand Marchand - * @version $Id: GISDataModelListPtAdapter.java,v 1.8 2007-04-16 16:33:52 deniger Exp $ - */ -public class GISDataModelPointMultiPointAdapter implements GISDataModel { - - /** Un attribut num\xE9ro de bloc, pour faire des groupes de points. */ - public static final GISAttributeInterface ATT_NUM_BLOC=new GISAttributeInteger("numbloc"); - - // Cache. - GISMultiPoint[] multi_=null; - Object[][] datas_=null; - - - int idxAttNumBloc_; - HashMap<Integer,ArrayList<Integer>> hibloc2ListPts_=new HashMap<Integer, ArrayList<Integer>>(); - GISDataModel initmd_; - - /** - * Constructeur. On ne controle pas que le modele contient bien des points. - */ - public GISDataModelPointMultiPointAdapter(final GISDataModel _mdpts) { - super(); - initmd_=_mdpts; - - idxAttNumBloc_=initmd_.getIndiceOf(ATT_NUM_BLOC); - // Pas de blocs, 1 seul multipoint. - if (idxAttNumBloc_==-1) { - ArrayList<Integer> idxpts=new ArrayList<Integer>(initmd_.getNumGeometries()); - for (int i=0; i<initmd_.getNumGeometries(); i++) idxpts.add(i); - hibloc2ListPts_.put(0,idxpts); - } - // Plusieurs blocs. - else { - for (int i=0; i<initmd_.getNumGeometries(); i++) { - Integer ibloc=(Integer)_mdpts.getValue(idxAttNumBloc_,i); - ArrayList<Integer> idxpts=hibloc2ListPts_.get(ibloc); - if (idxpts==null) { - idxpts=new ArrayList<Integer>(); - hibloc2ListPts_.put(ibloc, idxpts); - } - idxpts.add(i); - } - } - } - - /** - * Attention : L'attribut retourn\xE9 est non atomic (puisque issu du mod\xE8le initial), alors que pour les - * multipoints, il est atomique. - * @todo Modifier l'atomicit\xE9. - */ - public GISAttributeInterface getAttribute(final int _idxAtt){ - return initmd_.getAttribute(_idxAtt); - } - - public void preload(final GISAttributeInterface[] _att, final ProgressionInterface _prog) { - - } - - public Envelope getEnvelopeInternal() { - return initmd_.getEnvelopeInternal(); - } - -// public Object[] getDataModelForGeom(final int _idxGeom){ -// final Object[] r = new Object[getNbAttributes()]; -// for (int i = r.length - 1; i >= 0; i--) { -// r[i] = getValue(i, _idxGeom); -// } -// return r; -// } - - public double getDoubleValue(final int _idxAtt,final int _idxGeom){ - throw new IllegalAccessError("This method can't be accessed."); - } - - public Geometry getGeometry(final int _idxGeom){ - if (multi_==null) multi_=new GISMultiPoint[getNumGeometries()]; - if (multi_[_idxGeom]==null) { - ArrayList<Integer> idxpts=hibloc2ListPts_.get(_idxGeom); - Point[] pts=new Point[idxpts.size()]; - for (int i=0; i<idxpts.size(); i++) { - pts[i]=(Point)initmd_.getGeometry(idxpts.get(i)); - } - multi_[_idxGeom]=(GISMultiPoint)GISGeometryFactory.INSTANCE.createMultiPoint(pts); - } - return multi_[_idxGeom]; - } - - public int getIndiceOf(final GISAttributeInterface _att){ - return initmd_.getIndiceOf(_att); - } - - public int getNbAttributes(){ - return initmd_.getNbAttributes(); - } - - public int getNumGeometries(){ - return hibloc2ListPts_.size(); - } - - /** - * Retourne un tableau de valeurs atomiques (Z par exemple). - */ - public Object getValue(final int _idxAtt,final int _idxGeom){ - if (datas_==null) datas_=new Object[getNbAttributes()][]; - if (datas_[_idxAtt]==null) datas_[_idxAtt]=new Object[getNumGeometries()]; - - if (datas_[_idxAtt][_idxGeom]==null) { - ArrayList<Integer> idxpts=hibloc2ListPts_.get(_idxGeom); - Object[] vals=new Object[idxpts.size()]; - for (int i=0; i<idxpts.size(); i++) vals[i]=initmd_.getValue(_idxAtt,idxpts.get(i)); - datas_[_idxAtt][_idxGeom]=getAttribute(_idxAtt).createDataForGeom(vals, vals.length); - } - return datas_[_idxAtt][_idxGeom]; - } -} Copied: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointToMultiPointAdapter.java (from rev 4061, branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointMultiPointAdapter.java) =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointToMultiPointAdapter.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointToMultiPointAdapter.java 2008-10-16 14:01:02 UTC (rev 4073) @@ -0,0 +1,127 @@ +/* + * @creation 8 juin 2005 + * @modification $Date: 2007-04-16 16:33:52 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.ctulu.gis; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.Point; + +/** + * Un mod\xE8le pour adapter un modele de points vers un mod\xE8le de multip... [truncated message content] |
From: <cla...@us...> - 2008-10-16 13:40:54
|
Revision: 4072 http://fudaa.svn.sourceforge.net/fudaa/?rev=4072&view=rev Author: clavreul Date: 2008-10-16 13:40:50 +0000 (Thu, 16 Oct 2008) Log Message: ----------- astuces et logo Modified Paths: -------------- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/astuces.txt Added Paths: ----------- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/logo-perso.gif Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/astuces.txt =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/astuces.txt 2008-10-16 13:33:20 UTC (rev 4071) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/astuces.txt 2008-10-16 13:40:50 UTC (rev 4072) @@ -15,4 +15,5 @@ La note de calculs est generee ou exportee sous forme de fichiers html. Des parties du contenu de la note de calcul peuvent etre facilement copiees d'un navigateur Internet vers un tableur ou un traitement de texte. Les avertissements sont en deux categories : en vert les non-bloquants avertissant d'une incoherence potentielle dans les donnees mais permettant le lancement du calcul, en rouge les bloquants avertissant d'un probleme dans les donnees et empechant le lancement du calcul. Pour sauvegarder le projet utiliser l'ic\xF4ne ou faire ctrl+S. -La fenetre unite donne un certain nombre de conversions. \ No newline at end of file +La fenetre unite donne un certain nombre de conversions. +Pour inserer un logo personnalis\xE9 dans une note de calcul au format html, il suffit de remplacer le fichier "logo-perso.gif" du sous-repertoire notefiles, par une image au format gif (a renommer en logo-perso.gif) \ No newline at end of file Added: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/logo-perso.gif =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/logo-perso.gif ___________________________________________________________________ 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: <cla...@us...> - 2008-10-16 13:33:28
|
Revision: 4071 http://fudaa.svn.sourceforge.net/fudaa/?rev=4071&view=rev Author: clavreul Date: 2008-10-16 13:33:20 +0000 (Thu, 16 Oct 2008) Log Message: ----------- images relatives Modified Paths: -------------- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleResultatsCombinaison.java Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java 2008-10-15 22:33:24 UTC (rev 4070) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java 2008-10-16 13:33:20 UTC (rev 4071) @@ -343,14 +343,14 @@ String chemRel = ""; String chemAbs = ""; if (_mode.equals("todisk")) { - chemRel = name + "files" + AlbeLib.FILE_SEPARATOR + "cetmef-logo.gif"; - chemAbs = f + "files" + AlbeLib.FILE_SEPARATOR + "cetmef-logo.gif"; + chemRel = name + "files" + AlbeLib.FILE_SEPARATOR + "logo-perso.gif"; + chemAbs = f + "files" + AlbeLib.FILE_SEPARATOR + "logo-perso.gif"; } else if (_mode.equals("toscreen")) { chemRel = AlbeLib.NOTE_DE_CALCULS_HTML_FILE + "files" + AlbeLib.FILE_SEPARATOR - + "cetmef-logo.gif"; + + "logo-perso.gif"; chemAbs = chemRel; } - BuPicture picture = new BuPicture(AlbeResource.ALBE.getIcon("cetmef-logo")); + BuPicture picture = new BuPicture(AlbeResource.ALBE.getIcon("logo-perso")); FileOutputStream out = null; try { out = new FileOutputStream(chemAbs); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleResultatsCombinaison.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleResultatsCombinaison.java 2008-10-15 22:33:24 UTC (rev 4070) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleResultatsCombinaison.java 2008-10-16 13:33:20 UTC (rev 4071) @@ -96,9 +96,13 @@ String[] deflexions_; - /** nom du fichier pour l'exportation html des r\xE9sultats. */ + /** nom du fichier pour l'exportation html des r\xE9sultats. + * @f_ : chemin complet + * @fRel_ : chemin relatif + */ String f_; - + String fRel_; + /** * constructeur. */ @@ -207,8 +211,8 @@ f_ = AlbeLib.getFileChoosenByUser(this, "Exporter les r\xE9sultats d\xE9taill\xE9s", "Enregistrer", AlbeLib.USER_HOME + "resultatsAlbe_combinaison" - + (typeCombi_ == AlbeLib.COMBINAISON_MANUELLE ? "manuelle" : (numCombi_ + "_" + AlbeRes - .nomCombinaison(typeCombi_))) + ".html"); + + (typeCombi_ == AlbeLib.COMBINAISON_MANUELLE ? "manuelle" : (numCombi_ + "_" + AlbeRes.nomCombinaison(typeCombi_))) + ".html"); + fRel_ = "resultatsAlbe_combinaison"+ (typeCombi_ == AlbeLib.COMBINAISON_MANUELLE ? "manuelle" : (numCombi_ + "_" + AlbeRes.nomCombinaison(typeCombi_))) + ".html"; if (f_ == null) { return; } @@ -327,15 +331,26 @@ /** * */ - protected String addImgFromScript(final String _script, final String _imgname, final String _alt) { + /* protected String addImgFromScript(final String _script, final String _imgname, final String _alt) { String html = ""; final String _img = f_ + "files" + AlbeLib.FILE_SEPARATOR + _imgname; AlbeLib.exportGraphScriptToGif(_script, _img); html += "<a href=\"" + _img + "\" target=\"_blank\"><img src=\"" + _img + "\" alt =\"" + _alt + "\"></a>" + CtuluLibString.LINE_SEP; return html; + }*/ + + protected String addImgFromScript(final String _script, final String _imgname, final String _alt) { + String html = ""; + final String _img =f_+ "files" + "/" + _imgname; + final String _imgRel=fRel_ + "files" + "/" + _imgname; + AlbeLib.exportGraphScriptToGif(_script, _img); + html += "<a href=\"" + _imgRel + "\" target=\"_blank\"><img src=\"" + _imgRel + "\" alt =\"" + _alt + + "\"></a>" + CtuluLibString.LINE_SEP; + return html; } + /** * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-10-15 22:33:37
|
Revision: 4070 http://fudaa.svn.sourceforge.net/fudaa/?rev=4070&view=rev Author: deniger Date: 2008-10-15 22:33:24 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluArkSaver.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSavable.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigLib.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjectPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjetDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigFilleDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjetCommon.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrFilleVisu.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.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/telemac/TrTelemacCommunParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacCommunProjet.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluSavable.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManagerData.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersist.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluArkSaver.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluArkSaver.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluArkSaver.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -11,6 +11,8 @@ import java.io.IOException; import java.io.OutputStream; +import com.db4o.ObjectContainer; + /** * Une interface pour les classes permettant de sauvegarder des donn\xE9es dans une archive. Base sur le mode de * fonctionnement des Zip, tar Pour ajouter une entre dans le saver, il faut faire <code> @@ -65,4 +67,9 @@ */ File getDestDir(); + /** + * @return la base de donn\xE9es utilise pour sauver les props graphiques + */ + ObjectContainer getDb() throws IOException; + } Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluSavable.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluSavable.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluSavable.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -0,0 +1,20 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ctulu; + + +import com.db4o.ObjectContainer; + +/** + * @author deniger + * + */ +public interface CtuluSavable { + + public abstract void saveIn(ObjectContainer _db, ProgressionInterface _prog); + + public abstract void saveIn(CtuluArkSaver _writer, ProgressionInterface _prog); + +} \ No newline at end of file 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-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -21,7 +21,6 @@ import java.awt.image.BufferedImage; import java.awt.print.PageFormat; import java.awt.print.Printable; -import java.io.File; import java.util.Map; import javax.swing.Action; @@ -271,7 +270,6 @@ BuMenu[] specificMenus_; - public ZEbliCalquesPanel(final CtuluUI _ui) { this(null, new ZEbliCalquePanelController(_ui)); } @@ -799,6 +797,10 @@ public final void setModeVisible(final boolean _b) { mode_.setVisible(_b); } + + public ZEbliCalquesPanelPersistenceManager getPersistenceManager() { + return null; + } public void unsetCalqueInteractionActif(final BCalqueInteraction _b) { controller_.unsetCalqueInteractionActif(_b); @@ -906,19 +908,5 @@ return null; } - - /** - * retourne l'interface correspondante au niveauy m\xE9tier du calque. - * DOIT ETRE OVERRIDE par ses classes h\xE9riti\xE8res pour g\xE9rer la persistance des donn\xE9es. - * - * @param _f - * @return - */ - public ZebliCalqueDataPersitant getPersistantSaver() { - return null; - } - - - } \ No newline at end of file Copied: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java (from rev 4069, branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -0,0 +1,162 @@ +package org.fudaa.ebli.calque; + +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.Map; + +import org.fudaa.ctulu.CtuluUI; +import org.fudaa.ebli.courbe.EGGrapheTreeModel; +import org.fudaa.ebli.courbe.EGGroupPersist; + +import com.thoughtworks.xstream.XStream; +import com.thoughtworks.xstream.io.xml.DomDriver; + +/** + * Classe qui gere les diff\xE9rents fichiers pour la persistance du calque. Doit recevoir en parametre le path du + * repertoire dans lequel sera sauvegard\xE9 le calque. + * + * @author Adrien Hadoux + */ +public abstract class ZEbliCalquesPanelPersistenceManager { + + /** + * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et model... + */ + String directoryPath_; + Map parameters_; + + private XStream parser_; + + private static String MAINFILE = "descriptorCalque.xml"; + private static String DATA = "datas.xml"; + private static String SPECIFIQUEFILE = "specificDatas.xml"; + + public ZEbliCalquesPanelPersistenceManager() {} + + /** + * Recupere le parser adequat. + * + * @return + */ + private XStream getParser() { + if (parser_ == null) parser_ = initXmlParser(); + return parser_; + } + + /** + * Init le parser avec les alias adequats. + * + * @return + */ + private XStream initXmlParser() { + XStream xstream = new XStream(new DomDriver()); + // -- creation des alias pour que ce soit + parlant dans le xml file --// + xstream.alias("Groupe", EGGroupPersist.class); + + return xstream; + } + + /** + * Path vers els datas classique du calque + * + * @return + */ + private String getDataFilePath() { + return directoryPath_ + File.separator + DATA; + } + + /** + * Retourne le path vers le fiochier principal des courbes + * + * @return + */ + private String getMainFilePath() { + return directoryPath_ + File.separator + MAINFILE; + } + + /** + * Retourne le chemin vers le fichier de datats specifiques. + * + * @return + */ + private String getSpecifiqueDataFilePath() { + return directoryPath_ + File.separator + SPECIFIQUEFILE; + } + + /** + * Enrtegistre le calque au format persistant xml. + * + * @param parameters des parametres supplementaires utiles. + * @throws IOException + */ + public abstract void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist, File _dir, Map params) ; + + // } + // } + + // 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; + + } + + /** + * Methode qui remplit le panel fournit en parametre avec les donn\xE9es sauvegardees. + * + * @param panelToFill + */ + public abstract ZEbliCalquesPanel loadPersitCalqueXml(Map param, File _dir) ; +// { +// return null; + // 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(getSpecifiqueDataFilePath()))); + // ZebliCalqueDataPersitant dataPersistantes = (ZebliCalqueDataPersitant) in.readObject(); + // + // // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes + // veritablePanel = dataPersistantes.generateCalquePanel(param); + // + // } 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; +// } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistenceManager.java ___________________________________________________________________ Added: svn:mergeinfo + Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -10,6 +10,7 @@ import java.awt.Graphics; import java.awt.image.BufferedImage; import java.awt.print.PageFormat; +import java.io.File; import java.util.List; import java.util.Map; @@ -18,27 +19,26 @@ import javax.swing.JMenu; import javax.swing.event.InternalFrameEvent; -import com.memoire.bu.BuCommonInterface; -import com.memoire.bu.BuDesktop; -import com.memoire.bu.BuInformationsDocument; -import com.memoire.bu.BuMenu; -import com.memoire.fu.FuLog; - import org.fudaa.ctulu.CtuluSelectionInterface; import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.gui.CtuluFilleWithComponent; import org.fudaa.ctulu.image.CtuluImageProducer; - import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.commun.EbliPreferences; import org.fudaa.ebli.impression.EbliFilleImprimable; import org.fudaa.ebli.ressource.EbliResource; +import com.memoire.bu.BuCommonInterface; +import com.memoire.bu.BuDesktop; +import com.memoire.bu.BuInformationsDocument; +import com.memoire.bu.BuMenu; +import com.memoire.fu.FuLog; + /** * Fenetre d'affichage de calques contenant des services de base. (position souris, zoom fenetre, selection, - * transformations spatiales). Il est possible d'ajouter des boutons grace aux methodes <code>addButtonGroup</code>. - * Par defaut, 3 groupes de boutons sont proposes : selection, standard et navigation. Ils peuvent etre supprimes ou + * transformations spatiales). Il est possible d'ajouter des boutons grace aux methodes <code>addButtonGroup</code>. Par + * defaut, 3 groupes de boutons sont proposes : selection, standard et navigation. Ils peuvent etre supprimes ou * modifies avec les methodes remove * * @version $Id: ZEbliFilleCalques.java,v 1.64 2007-05-04 13:49:43 deniger Exp $ @@ -101,7 +101,6 @@ pack(); } - protected void addCalque(final BCalque _b, final boolean _enPremier) { pn_.addCalque(_b, _enPremier); @@ -113,8 +112,6 @@ fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_ACTIVATED); } - - /** * Modifie la propriete <code>enable</code> de tous les boutons du groupe selection. * @@ -184,8 +181,8 @@ } /* *//** - * @return le menu contextuel a utiliser - */ + * @return le menu contextuel a utiliser + */ /* * public JPopupMenu getCmdsContextuelles() { return null; } */ @@ -243,9 +240,7 @@ l.toArray(specificTools_); pn_.updateKeyMap(this); } - if (specificTools_ == null) { - return null; - } + if (specificTools_ == null) { return null; } final JComponent[] r = new JComponent[specificTools_.length]; System.arraycopy(specificTools_, 0, r, 0, r.length); return r; @@ -278,7 +273,7 @@ public void majComponent(final Object _o) { if (_o instanceof BArbreCalque) { final BArbreCalque arbre = (BArbreCalque) _o; - + arbre.setModel(getArbreCalqueModel()); } else { FuLog.error("ECA: not a bcalque"); @@ -294,7 +289,7 @@ } public BufferedImage produceImage(final int _w, final int _h, final Map _params) { - return pn_.produceImage(_w,_h, _params); + return pn_.produceImage(_w, _h, _params); } public void replace() {} Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -1,28 +0,0 @@ -package org.fudaa.ebli.calque; - -import java.util.Map; - - - -/** - * Interface definissant les datas persistantes du calque. - * Les classes qui impl\xE9mentent cette interface doivent etre SERIALIZABLE!!!! - * @author Adrien Hadoux - * - */ -public interface ZebliCalqueDataPersitant { - - /** - * Remplir les infos du calque correspondant - * @param panel - */ - public void fillInfoWith(ZEbliCalquesPanel panel); - - /** - * Methode qui genere le calque panel a partir des donn\xE9es - * @param parameters - * @return - */ - public ZEbliCalquesPanel generateCalquePanel(Map parameters); - -} Deleted: 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-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -1,226 +0,0 @@ -package org.fudaa.ebli.calque; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.util.Map; - -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ebli.courbe.EGGrapheTreeModel; -import org.fudaa.ebli.courbe.EGGroupPersist; - -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.io.xml.DomDriver; - - -/** - * Classe qui gere les diff\xE9rents fichiers pour la persistance du calque. Doit - * recevoir en parametre le path du repertoire dans lequel sera sauvegard\xE9 le - * calque. - * - * @author Adrien Hadoux - * - */ -public class ZebliCalquePersist { - - /** - * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et - * model... - */ - String directoryPath_; - Map parameters_; - - - private XStream parser_; - - private static String MAINFILE = "descriptorCalque.xml"; - private static String DATA = "datas.xml"; - private static String SPECIFIQUEFILE="specificDatas.xml"; - - - - public ZebliCalquePersist(String directoryPath_, Map parameters) throws IOException { - this.directoryPath_ = directoryPath_; - parameters_ = parameters; - } - - - - /** - * Recupere le parser adequat. - * @return - */ - private XStream getParser(){ - if(parser_==null) - parser_=initXmlParser(); - return parser_; - } - - /** - * Init le parser avec les alias adequats. - * @return - */ - private XStream initXmlParser(){ - XStream xstream = new XStream(new DomDriver()); - //-- creation des alias pour que ce soit + parlant dans le xml file --// - xstream.alias("Groupe", EGGroupPersist.class); - - return xstream; - } - - /** - * Path vers els datas classique du calque - * @return - */ - private String getDataFilePath(){ - return directoryPath_+File.separator+DATA; - } - - - /** - * Retourne le path vers le fiochier principal des courbes - * @return - */ - private String getMainFilePath(){ - return directoryPath_+File.separator+MAINFILE; - } - - - /** - * Retourne le chemin vers le fichier de datats specifiques. - * @return - */ - private String getSpecifiqueDataFilePath(){ - return directoryPath_+File.separator+SPECIFIQUEFILE; - } - - /** - * Enrtegistre le calque au format persistant xml. - * - * @param parameters - * des parametres supplementaires utiles. - * @throws IOException - */ - public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist) { - ObjectOutputStream out=null; - // -- etape 1: on sauvegarde les datasPersistantes du panel au format zip dans le main - // path principale --// - ZebliCalqueDataPersitant dataPersistantes= panelTopersist.getPersistantSaver(); - dataPersistantes.fillInfoWith(panelTopersist); - try { - out = getParser().createObjectOutputStream(new FileWriter(new File(getSpecifiqueDataFilePath()))); - 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(); - } - } - - //-- etape 2: on sauvegarde le type de zeblicalquePanel dans le fichier general --// -// try { -// out = getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); -// -// //-- donneees bidon --// -// //-- on enregistre le nb de pages --// -// out.writeInt(panelTopersist.getNumberOfPages()); -// //-- fin donn\xE9es bidons --// -// -// //-- on enregistre le type de calque --// -// out.writeObject(panelTopersist.getClass().toString()); -// -// } 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 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(getSpecifiqueDataFilePath()))); - ZebliCalqueDataPersitant dataPersistantes= (ZebliCalqueDataPersitant) in.readObject(); - - //-- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes - veritablePanel=dataPersistantes.generateCalquePanel(param); - - } 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; - } - - -} 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-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -8,9 +8,7 @@ import java.util.HashMap; import java.util.Map; -import org.fudaa.ctulu.CtuluUI; import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.ebli.calque.ZebliCalquePersist; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; @@ -34,9 +32,11 @@ public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque) { this(calque, null); } + public EbliWidgetCreatorVueCalque() { - + } + public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque, GrBoite _initZoom) { super(); this.calque_ = calque; @@ -117,7 +117,6 @@ this.calque_ = calque; } - public Object getPersistData(Map parameters) { // TODO Auto-generated method stub // -- generation d'un identifiant unique pour le repertoire du graphe --// @@ -131,11 +130,8 @@ File createRep = new File(pathUnique); if (createRep.mkdir() || createRep.isDirectory()) { // (new FudaaFilleVisuPersistence(getCalque())).saveZEbliCalquesPanelIn - try { - (new ZebliCalquePersist(pathUnique, parameters)).savePersitCalqueXml(getCalque()); - } catch (IOException e) { - e.printStackTrace(); - } + getCalque().getPersistenceManager().savePersitCalqueXml(getCalque(), createRep, parameters); +// new ZebliCalquePersist(pathUnique, parameters).savePersitCalqueXml(getCalque()); } @@ -143,25 +139,23 @@ } public void setPersistData(Object data, Map parameters) { - // TODO Auto-generated method stub - if (data == null) - calque_ = new ZEbliCalquesPanel(null); + //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) data; - try { - calque_ = (new ZebliCalquePersist(pathCalque, parameters)).loadPersitCalqueXml(parameters ); - - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } +// try { +//// calque_ = (new ZebliCalquePersist(pathCalque, parameters)).loadPersitCalqueXml(parameters); +// +// } catch (FileNotFoundException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } catch (IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } } } - - } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -9,6 +9,7 @@ import java.io.IOException; +import org.fudaa.ctulu.CtuluArkSaver; import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ebli.calque.BCalque; @@ -85,7 +86,7 @@ - public void saveIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { + public void saveIn(final CtuluArkSaver _writer, final ProgressionInterface _prog) { try { final BGroupeCalque donneesCalque = visu_.getDonneesCalque(); _writer.createDir(rep_, donneesCalque.getTousCalques().length + 1); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSavable.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSavable.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSavable.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -7,19 +7,16 @@ */ package org.fudaa.fudaa.commun.save; -import com.db4o.ObjectContainer; +import org.fudaa.ctulu.CtuluSavable; -import org.fudaa.ctulu.ProgressionInterface; + /** * Une interface a implementer pour les composants persistants (stockables sur fichiers projet). + * * @author bmarchan * @version $Id: FudaaSavable.java,v 1.3 2008-01-10 09:58:20 bmarchan Exp $ */ -public interface FudaaSavable { +public interface FudaaSavable extends CtuluSavable { - void saveIn(ObjectContainer _db, ProgressionInterface _prog); - - void saveIn(FudaaSaveZipWriter _writer, ProgressionInterface _prog); - } Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -1,168 +0,0 @@ -/* - * @creation 30 ao\xFBt 06 - * @modification $Date: 2007-05-04 13:58:09 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.commun.save; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.HashMap; -import java.util.Map; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -import com.db4o.Db4o; -import com.db4o.ObjectContainer; - -import org.fudaa.ctulu.CtuluArkSaver; -import org.fudaa.ctulu.CtuluLibFile; -import org.fudaa.ctulu.CtuluLibString; - -/** - * @author fred deniger - * @version $Id: FudaaSaveZipWriter.java,v 1.4 2007-05-04 13:58:09 deniger Exp $ - */ -public class FudaaSaveZipWriter implements CtuluArkSaver { - - public class DirZipEntry { - int idx_; - final String name_; - final int nbDigits_; - - /** - * @param _name le nom du dossier a inserer dans le zip - * @param _nbEntry le nombre d'entrees pr\xE9vues y compris les dossiers - */ - public DirZipEntry(final String _name, final int _nbEntry) { - super(); - name_ = _name; - nbDigits_ = Integer.toString(_nbEntry).length() + 1; - } - - /** - * @param _entry l'entree a ajouter - * @return name_+"/"+_entry - */ - public String getEntryName(final String _entry) { - return name_ + '/' + _entry; - } - - /** - * @return un nouvelle identifiant - */ - public String getNextId() { - return CtuluLibString.adjustSizeBefore(nbDigits_, Integer.toString(++idx_), '0') + '-'; - } - - } - ObjectContainer cont_; - File dbFile_; - final File f_; - - public static String getIdFromEntry(final String _entry) { - if (_entry == null) { - return null; - } - final int idx = _entry.indexOf('-'); - if (idx >= 0) { - return _entry.substring(0, idx + 1); - } - return null; - } - Map nameDirZip_; - - final ZipOutputStream zipOut_; - - public FudaaSaveZipWriter(final File _f) throws IOException { - super(); - f_ = _f; - zipOut_ = new ZipOutputStream(new FileOutputStream(f_)); - zipOut_.setLevel(8); - } - - public File getDestDir() { - return f_.getParentFile(); - } - - public void close() throws IOException { - if (zipOut_ != null) { - if (dbFile_ != null && cont_ != null) { - cont_.close(); - final ZipEntry entry = new ZipEntry(getDbEntryName()); - entry.setComment("Donnees concernant le style et les calculs interm\xE9diaires"); - zipOut_.putNextEntry(entry); - CtuluLibFile.copyStream(new FileInputStream(dbFile_), zipOut_, true, false); - zipOut_.closeEntry(); - dbFile_.delete(); - } - zipOut_.close(); - } - } - - public boolean isDirCreated(final String _name) { - return (nameDirZip_ != null) && nameDirZip_.containsKey(_name); - } - - public void createDir(final String _dirName, final int _nbEntry) { - createDirZipEntry(_dirName, _nbEntry); - - } - - public String getNextIdForDir(final String _dir) { - final DirZipEntry entry = getDirZipEntry(_dir); - return entry == null ? null : entry.getNextId(); - } - - public void startEntry(final String _entryName) throws IOException { - zipOut_.putNextEntry(new ZipEntry(_entryName)); - - } - - public DirZipEntry createDirZipEntry(final String _name, final int _nbEntry) { - if (nameDirZip_ == null) { - nameDirZip_ = new HashMap(); - } else if (nameDirZip_.containsKey(_name)) { - throw new IllegalAccessError("ebtry is already created"); - } - final DirZipEntry res = new DirZipEntry(_name, _nbEntry); - nameDirZip_.put(_name, res); - return res; - } - - public boolean isDbCreated() { - return cont_ != null; - } - - public ObjectContainer getDb() throws IOException { - if (cont_ == null) { - dbFile_ = File.createTempFile("fudaa.project", ".db"); - if (dbFile_ != null) { - FudaaSaveLib.configureDb4o(); - cont_ = Db4o.openFile(dbFile_.getAbsolutePath()); - } - } - return cont_; - } - - public static String getDbEntryName() { - return "project.db"; - } - - public OutputStream getOutStream() { - return zipOut_; - } - - public DirZipEntry getDirZipEntry(final String _name) { - return (nameDirZip_ == null) ? null : (DirZipEntry) nameDirZip_.get(_name); - } - - public static String getProjectDescEntryName() { - return "project.desc.xml"; - } -} Added: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -0,0 +1,168 @@ +/* + * @creation 30 ao\xFBt 06 + * @modification $Date: 2007-05-04 13:58:09 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.fudaa.commun.save; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import com.db4o.Db4o; +import com.db4o.ObjectContainer; + +import org.fudaa.ctulu.CtuluArkSaver; +import org.fudaa.ctulu.CtuluLibFile; +import org.fudaa.ctulu.CtuluLibString; + +/** + * @author fred deniger + * @version $Id: FudaaSaveZipWriter.java,v 1.4 2007-05-04 13:58:09 deniger Exp $ + */ +public class FudaaSaveZipWriter implements CtuluArkSaver { + + public class DirZipEntry { + int idx_; + final String name_; + final int nbDigits_; + + /** + * @param _name le nom du dossier a inserer dans le zip + * @param _nbEntry le nombre d'entrees pr\xE9vues y compris les dossiers + */ + public DirZipEntry(final String _name, final int _nbEntry) { + super(); + name_ = _name; + nbDigits_ = Integer.toString(_nbEntry).length() + 1; + } + + /** + * @param _entry l'entree a ajouter + * @return name_+"/"+_entry + */ + public String getEntryName(final String _entry) { + return name_ + '/' + _entry; + } + + /** + * @return un nouvelle identifiant + */ + public String getNextId() { + return CtuluLibString.adjustSizeBefore(nbDigits_, Integer.toString(++idx_), '0') + '-'; + } + + } + ObjectContainer cont_; + File dbFile_; + final File f_; + + public static String getIdFromEntry(final String _entry) { + if (_entry == null) { + return null; + } + final int idx = _entry.indexOf('-'); + if (idx >= 0) { + return _entry.substring(0, idx + 1); + } + return null; + } + Map nameDirZip_; + + final ZipOutputStream zipOut_; + + public FudaaSaveZipWriter(final File _f) throws IOException { + super(); + f_ = _f; + zipOut_ = new ZipOutputStream(new FileOutputStream(f_)); + zipOut_.setLevel(8); + } + + public File getDestDir() { + return f_.getParentFile(); + } + + public void close() throws IOException { + if (zipOut_ != null) { + if (dbFile_ != null && cont_ != null) { + cont_.close(); + final ZipEntry entry = new ZipEntry(getDbEntryName()); + entry.setComment("Donnees concernant le style et les calculs interm\xE9diaires"); + zipOut_.putNextEntry(entry); + CtuluLibFile.copyStream(new FileInputStream(dbFile_), zipOut_, true, false); + zipOut_.closeEntry(); + dbFile_.delete(); + } + zipOut_.close(); + } + } + + public boolean isDirCreated(final String _name) { + return (nameDirZip_ != null) && nameDirZip_.containsKey(_name); + } + + public void createDir(final String _dirName, final int _nbEntry) { + createDirZipEntry(_dirName, _nbEntry); + + } + + public String getNextIdForDir(final String _dir) { + final DirZipEntry entry = getDirZipEntry(_dir); + return entry == null ? null : entry.getNextId(); + } + + public void startEntry(final String _entryName) throws IOException { + zipOut_.putNextEntry(new ZipEntry(_entryName)); + + } + + public DirZipEntry createDirZipEntry(final String _name, final int _nbEntry) { + if (nameDirZip_ == null) { + nameDirZip_ = new HashMap(); + } else if (nameDirZip_.containsKey(_name)) { + throw new IllegalAccessError("ebtry is already created"); + } + final DirZipEntry res = new DirZipEntry(_name, _nbEntry); + nameDirZip_.put(_name, res); + return res; + } + + public boolean isDbCreated() { + return cont_ != null; + } + + public ObjectContainer getDb() throws IOException { + if (cont_ == null) { + dbFile_ = File.createTempFile("fudaa.project", ".db"); + if (dbFile_ != null) { + FudaaSaveLib.configureDb4o(); + cont_ = Db4o.openFile(dbFile_.getAbsolutePath()); + } + } + return cont_; + } + + public static String getDbEntryName() { + return "project.db"; + } + + public OutputStream getOutStream() { + return zipOut_; + } + + public DirZipEntry getDirZipEntry(final String _name) { + return (nameDirZip_ == null) ? null : (DirZipEntry) nameDirZip_.get(_name); + } + + public static String getProjectDescEntryName() { + return "project.desc.xml"; + } +} Property changes on: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java ___________________________________________________________________ Added: svn:mergeinfo + Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigLib.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigLib.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigLib.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -15,9 +15,9 @@ import org.fudaa.ctulu.CtuluLibFile; import org.fudaa.ebli.calque.ZCalqueSelectionInteractionAbstract; - import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; + /** * Classe fourre tout d'utilitaires. * @author Fred Deniger Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjectPersistence.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjectPersistence.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjectPersistence.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -20,6 +20,7 @@ import org.fudaa.ctulu.CtuluLibFile; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.CtuluSavable; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; @@ -83,11 +84,11 @@ for (int i = iframes.length - 1; i >= 0; i--) { if (iframes[i] instanceof FudaaSavable && !compSaved.contains(iframes[i])) { compSaved.add(iframes[i]); - ((FudaaSavable) iframes[i]).saveIn(writer, _prog); + ((CtuluSavable) iframes[i]).saveIn(writer, _prog); } } } - final FudaaSavable[] compToSave = _proj.getSavableComponent(); + final CtuluSavable[] compToSave = _proj.getSavableComponent(); if (compToSave != null) { for (int i = compToSave.length - 1; i >= 0; i--) { if (compToSave[i] != null && !compSaved.contains(compToSave[i])) { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjet.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjet.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjet.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -11,11 +11,11 @@ import com.memoire.bu.BuInformationsDocument; +import org.fudaa.ctulu.CtuluSavable; import org.fudaa.dodico.fichiers.FileFormatSoftware; import org.fudaa.fudaa.commun.FudaaProjectInterface; import org.fudaa.fudaa.commun.FudaaProjetStateInterface; -import org.fudaa.fudaa.commun.save.FudaaSavable; /** * @author fred deniger @@ -26,7 +26,7 @@ /** * @return les composants qui doivent etre sauvegard\xE9s */ - FudaaSavable[] getSavableComponent(); + CtuluSavable[] getSavableComponent(); /** * @return la version soft, version et langage utilise Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjetDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjetDefault.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigProjetDefault.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -15,13 +15,13 @@ import com.memoire.bu.BuInformationsDocument; +import org.fudaa.ctulu.CtuluSavable; import org.fudaa.dodico.fichiers.FileFormatSoftware; import org.fudaa.fudaa.commun.FudaaLib; import org.fudaa.fudaa.commun.FudaaProjectStateFrameListener; import org.fudaa.fudaa.commun.FudaaProjetStateDefault; import org.fudaa.fudaa.commun.FudaaProjetStateInterface; -import org.fudaa.fudaa.commun.save.FudaaSavable; /** * Fudaa-Modeleur : Une implementation de l'interface projet. @@ -65,7 +65,7 @@ opening_ = _b; } - public FudaaSavable[] getSavableComponent() { + public CtuluSavable[] getSavableComponent() { return null; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigFilleDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigFilleDefault.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigFilleDefault.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -13,6 +13,7 @@ import com.memoire.bu.BuUndoRedoInterface; +import org.fudaa.ctulu.CtuluArkSaver; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluExportDataInterface; import org.fudaa.ctulu.CtuluUI; @@ -26,7 +27,6 @@ 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; import org.fudaa.fudaa.sig.FSigVisuPanelDefault; @@ -44,7 +44,7 @@ setPreferredSize(new Dimension(500, 400)); } - public void saveIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { + public void saveIn(final CtuluArkSaver _writer, final ProgressionInterface _prog) { new FudaaFilleVisuPersistence(this).saveIn(_writer, _prog); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -17,9 +17,11 @@ import javax.swing.JComponent; +import org.fudaa.ctulu.CtuluArkSaver; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluUndoRedoInterface; +import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ebli.calque.BArbreCalque; import org.fudaa.ebli.calque.BGroupeCalque; import org.fudaa.ebli.calque.ZCalqueGrille; @@ -36,6 +38,7 @@ import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; import org.fudaa.fudaa.sig.FSigAttibuteTypeManager; +import com.db4o.ObjectContainer; import com.memoire.bu.BuMenu; /** @@ -44,6 +47,10 @@ */ public abstract class FSigVisuPanel extends ZEbliCalquesPanel implements CtuluUndoRedoInterface { + + + + private final CtuluCommandManager mng_; FSigAttibuteTypeManager attMng_; @@ -226,7 +233,6 @@ public final void updateInfoComponent() { getController().updateInfoComponent(); } - Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjetCommon.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjetCommon.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjetCommon.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -27,6 +27,7 @@ import org.fudaa.ctulu.CtuluHtmlWriter; import org.fudaa.ctulu.CtuluLib; +import org.fudaa.ctulu.CtuluSavable; import org.fudaa.ctulu.CtuluTaskDelegate; import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.ProgressionInterface; @@ -50,7 +51,6 @@ import org.fudaa.fudaa.commun.courbe.FudaaGrapheTimeAnimatedVisuPanel; import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; import org.fudaa.fudaa.commun.projet.FudaaProjetInformationPanel; -import org.fudaa.fudaa.commun.save.FudaaSavable; import org.fudaa.fudaa.fdico.FDicoProjectState; import org.fudaa.fudaa.meshviewer.MvResource; import org.fudaa.fudaa.meshviewer.MvSelectionNodeOrEltData; @@ -327,8 +327,8 @@ return getTrParams().getH2dParametres().getMaillage(); } - public FudaaSavable[] getSavableComponent() { - return new FudaaSavable[] { visu_ }; + public CtuluSavable[] getSavableComponent() { + return new CtuluSavable[] { visu_ }; } public File getSaveFile() { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrFilleVisu.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrFilleVisu.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrFilleVisu.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -11,6 +11,7 @@ import javax.swing.Action; import javax.swing.JMenu; +import org.fudaa.ctulu.CtuluArkSaver; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluExportDataInterface; import org.fudaa.ctulu.CtuluHtmlWriter; @@ -30,7 +31,6 @@ 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.tr.common.TrFilleVisuInterface; import org.fudaa.fudaa.tr.common.TrResource; @@ -232,7 +232,7 @@ @Override public void replace() {} - public void saveIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { + public void saveIn(final CtuluArkSaver _writer, final ProgressionInterface _prog) { new FudaaFilleVisuPersistence(this).saveIn(_writer, _prog); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -27,6 +27,7 @@ import javax.swing.ListModel; import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.ctulu.CtuluArkSaver; import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluExpr; @@ -57,7 +58,6 @@ import org.fudaa.ebli.palette.BPaletteInfo.InfoData; import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeListModel; import org.fudaa.fudaa.commun.save.FudaaSaveLib; -import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; import org.fudaa.fudaa.tr.common.TrPreferences; import org.fudaa.fudaa.tr.common.TrResource; import org.nfunk.jep.Variable; @@ -1278,7 +1278,7 @@ } } - public void saveIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { + public void saveIn(final CtuluArkSaver _writer, final ProgressionInterface _prog) { try { saveIn(_writer.getDb(), _prog); } catch (final IOException _evt) { 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-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -8,8 +8,6 @@ package org.fudaa.fudaa.tr.post; import java.awt.event.ActionEvent; -import java.io.File; -import java.io.IOException; import java.util.List; import java.util.Map; import java.util.Set; @@ -37,8 +35,7 @@ import org.fudaa.ebli.calque.ZCalqueSondeInteraction; import org.fudaa.ebli.calque.ZCalqueSondeInterface; import org.fudaa.ebli.calque.ZEbliCalquePanelController; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.ebli.calque.ZebliCalqueDataPersitant; +import org.fudaa.ebli.calque.ZEbliCalquesPanelPersistenceManager; import org.fudaa.ebli.calque.action.CalqueActionSonde; import org.fudaa.ebli.calque.action.EbliCalqueActionTimeChooser; import org.fudaa.ebli.calque.action.EbliCalqueActionVariableChooser; @@ -48,9 +45,6 @@ import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; -import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; -import org.fudaa.fudaa.commun.save.FudaaSaveZipLoader; -import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; import org.fudaa.fudaa.meshviewer.MvSelectionNodeOrEltData; import org.fudaa.fudaa.meshviewer.export.MvExportFactory; import org.fudaa.fudaa.meshviewer.layer.MvFrontierLayerAbstract; @@ -74,6 +68,11 @@ @SuppressWarnings("serial") public class TrPostVisuPanel extends TrVisuPanel implements TrPostDataListener, EbliAnimatedInterface { + @Override + public ZEbliCalquesPanelPersistenceManager getPersistenceManager() { + return new TrPostVisuPanelPersistenceManager(); + } + private class EvolutionAction extends EbliActionSimple { boolean rubar_; @@ -151,7 +150,6 @@ protected TrPostProjet projet_; - public boolean simplifiedInit; /** * Tres important!!! c'est la source utilisee par le trpostvisupanel. Il est automatiquement plac\xE9 en param du @@ -161,9 +159,6 @@ final JComponent suiviPanel_; - - - public TrPostVisuPanel(final TrPostCommonImplementation _impl, final TrPostProjet _projet, final BCalqueLegende _leg, final TrPostSource _src) { this(_impl, _projet, false, _leg, _src); @@ -193,7 +188,7 @@ isoLayer_ = buildIsoLayer(); final EbliActionInterface[] action = new EbliActionInterface[] { addActionEvolutionFor(getSource().isRubar()), new TrIsoLineAction(this) }; - simplifiedInit=_simplified; + simplifiedInit = _simplified; if (!_simplified) { final TrPostFlecheLayer fleche = new TrPostFlecheLayer(source_); fleche.setVisible(false); @@ -221,8 +216,6 @@ } - - protected EbliActionInterface addActionEvolutionFor(final boolean _rubar) { return new EvolutionAction(_rubar); } @@ -512,13 +505,5 @@ public TrPostProjet getProjet_() { return projet_; } - - - - - public ZebliCalqueDataPersitant getPersistantSaver() { - return new TrPostVisuPanelPersist(); - } - } \ No newline at end of file Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersist.java 2008-10-15 17:54:53 UTC (rev 4069) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersist.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -1,95 +0,0 @@ -package org.fudaa.fudaa.tr.post; - -import java.io.File; -import java.util.Map; - -import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.ebli.calque.ZebliCalqueDataPersitant; -import org.fudaa.ebli.visuallibrary.EbliScene; -import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; - -/** - * Version persistante du trpostVisuPanel. - * Peut etre sauvegard\xE9, a partir d'un trpostvisupanel et permet de sauvegarder un autre trpostvisupanel - * @author Adrien Hadoux - * - */ -public class TrPostVisuPanelPersist implements ZebliCalqueDataPersitant{ - - /** - * Chemin de la source utilis\xE9e poru g\xE9n\xE9rer le calque - */ - String pathSource; - - boolean simplified; - - - TrPostVisuPanelPersist(){ - - } - - /** - * Remplit les infos persistantes avec celel du trpostvisupanel - * @param panel - */ - public void fillInfoWith(ZEbliCalquesPanel p){ - TrPostVisuPanel panel= (TrPostVisuPanel) p; - simplified=panel.simplifiedInit; - pathSource=panel.getSource().getFile().getAbsolutePath(); - - //-- sauvegarde complete accessoire --// -// try { -// (new FudaaFilleVisuPersistence(this, getImpl())).saveIn(new FudaaSaveZipWriter(_f), getImpl() -// .getMainProgression()); -// } catch (IOException e) { -// e.printStackTrace(); -// } - - - } - - - /** - * Methode qui reconstruit le trpostvisupanel a partir des donn\xE9es persistantes. - * @param parameters - * @return - */ - public ZEbliCalquesPanel generateCalquePanel(Map parameters){ - - TrPostProjet projet=(TrPostProjet) parameters.get("TrPostProjet"); - - if(projet==null) - return null; - - //-- etape 1: recherche du source qui contient le path donn\xE9 --// - TrPostSource src=projet.findSource(pathSource); - - //-- etape 2 si source pas trouv\xE9, chargement du source --// - if(src==null){ - TrPostMultiSourceActivator activator=new TrPostMultiSourceActivator(projet); - activator.active(new File(pathSource),projet.getImpl()); - } - - //-- etape 3: creation du legende adapter --// - final CalqueLegendeWidgetAdapter legendeCalque = new CalqueLegendeWidgetAdapter((EbliScene) parameters.get("scene"), null); - - - //-- etape 3: creation du panel --// - if(src==null)return null; - - TrPostVisuPanel newPanel=new TrPostVisuPanel(projet.getImpl(),projet,legendeCalque,src); - - - - //-- accessoire: restorer les donn\xE9es --// -// try { -// (new FudaaFilleVisuPersistence(panel, panel.getImpl())).restore(panel.getImpl(), new FudaaSaveZipLoader(f), panel.getImpl() -// .getMainProgression()); -// } catch (IOException e) { -// e.printStackTrace(); -// } - - return newPanel; - } - -} Copied: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManager.java (from rev 4069, branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersist.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManager.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManager.java 2008-10-15 22:33:24 UTC (rev 4070) @@ -0,0 +1,115 @@ +package org.fudaa.fudaa.tr.post; + +import java.io.File; +import java.io.IOException; +import java.util.Map; + +import org.fudaa.ctulu.CtuluArkSaver; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.calque.ZEbliCalquesPanelPersistenceManager; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; +import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; +import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; + +import com.db4o.ObjectContainer; + +/** + * Version persistante du trpostVisuPanel. Peut etre sauvegard\xE9, a partir d'un trpostvisupanel et permet de sauvegarder + * un autre trpostvisupanel + * + * @author Adrien Hadoux + */ +public class TrPostVisuPanelPersistenceManager extends ZEbliCalquesPanelPersistenceManager { + + + + File dist_; + + TrPostVisuPanelPersistenceManager() {} + +// /** +// * Remplit les infos persistantes avec celel du trpostvisupanel +// * +// * @param panel +// */ +// public void fillInfoWith(ZEbliCalquesPanel p) { +// TrPostVisuPanel panel = (TrPostVisuPanel) p; +// data_.simplified = panel.simplifiedInit; +// data_.pathSource = panel.getSource().getFile().getAbsolutePath(); +// try { +// p.saveIn(new FudaaSaveZipWriter(dist_), p.getCtuluUI().getMainProgression()); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// +// } +// +// /** +// * Methode qui reconstruit le trpostvisupanel a partir des donn\xE9es persistantes. +// * +// * @param parameters +// * @return +// */ +// public ZEbliCalquesPanel generateCalquePanel(Map parameters) { +// +// TrPostProjet projet = (TrPostProjet) parameters.get("TrPostProjet"); +// +// if (projet == null) return null; +// +// // -- etape 1: recherche du source qui contient le path donn\xE9 --// +// TrPostSource src = projet.findSource(data_.pathSource); +// +// // -- etape 2 si source pas trouv\xE9, chargement du source --// +// if (src == null) { +// TrPostMultiSourceActivator activator = new TrPostMultiSourceActivator(projet); +// activator.active(new File(data_.pathSource), projet.getImpl()); +// } +// +// // -- etape 3: creation du legende adapter --// +// final CalqueLegendeWidgetAdapter legendeCalque = new CalqueLegendeWidgetAdapter( +// (EbliScene) parameters.get("scene"), null); +// +// // -- etape 3: creation du panel --// +// if (src == null) return null; +// +// TrPostVisuPanel newPanel = new TrPostVisuPanel(projet.getImpl(), projet, legendeCalque, src); +// +// // -- accessoire: restorer les donn\xE9es --// +// // try { +// // (new FudaaFilleVisuPersistence(panel, panel.getImpl())).restore(panel.getImpl(), new FudaaSaveZipLoader(f), +// // panel.getImpl() +// // .getMainProgression()); +// // } catch (IOException e) { +// // e.printStackTrace(); +// // } +// +// return newPanel; +// } + + @Override + public ZEbliCalquesPanel loadPersitCalqueXml(Map _param, File _dir) { + //il faut recuperer la source et construire le TrPOstVisuPanel normalemet + //pour les donn\xE9es, il faut s'inspirer de FudaaFilleVisuPersistence.restore + return null; + } + + @Override + public void savePersitCalqueXml(ZEbliCalquesPanel _panelTopersist, File _dir, Map _params) { + //TODO il faut persister les datas + TrPostVisuPanelPersistenceManagerData data= new TrPostVisuPanelPersistenceManagerData(); + //TODO ici il faudrait sauvegarder un identifiant de source comme ce doit etre le cas pour les graphes + data.pathSource=((TrPostVisuPanel)_panelTopersist).getSource().getFile().getAbsolutePath(); + //sauvegarder les datas avec xstream + //les donnees + try { + new FudaaFilleVisuPersistence(_panelTopersist, _panelTopersist.getCtuluUI()).saveIn(new FudaaSaveZipWriter(_dir), + _panelTopersist.getCtuluUI().getMainProgression()); + } catch (IOException e) { + e.printStackTrace(); + } + + } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManager.java ___________________________________________________________________ Added: svn:mergeinfo + Added: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistenceManagerData.java =================================================================== --- bran... [truncated message content] |
From: <had...@us...> - 2008-10-15 18:13:48
|
Revision: 4068 http://fudaa.svn.sourceforge.net/fudaa/?rev=4068&view=rev Author: hadouxad Date: 2008-10-15 17:46:32 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Persistance des calques Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.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/sig/layer/FSigVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 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-10-15 17:32:24 UTC (rev 4067) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-10-15 17:46:32 UTC (rev 4068) @@ -271,13 +271,6 @@ BuMenu[] specificMenus_; - /** - * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! - * RESERVE POUR LA SERIALIZATION DES DONNEES. - */ - public ZEbliCalquesPanel(){ - - } public ZEbliCalquesPanel(final CtuluUI _ui) { this(null, new ZEbliCalquePanelController(_ui)); 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-10-15 17:32:24 UTC (rev 4067) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2008-10-15 17:46:32 UTC (rev 4068) @@ -168,14 +168,8 @@ private BuMenu edgeDisplayTools_; - /** - * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! - * RESERVE POUR LA SERIALIZATION DES DONNEES. - */ - protected MvVisuPanel(){ - super(); - } + /** * @param _impl l'implementation parente */ Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 17:32:24 UTC (rev 4067) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 17:46:32 UTC (rev 4068) @@ -63,16 +63,8 @@ - /** - * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! - * RESERVE POUR LA SERIALIZATION DES DONNEES. - */ - protected FSigVisuPanel(){ - super(); - mng_=null; - impl_=null; - } + /** * @param _impl l'implementation parente */ Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java 2008-10-15 17:32:24 UTC (rev 4067) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java 2008-10-15 17:46:32 UTC (rev 4068) @@ -43,14 +43,8 @@ - /** - * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! - * RESERVE POUR LA SERIALIZATION DES DONNEES. - */ - protected TrVisuPanel(){ - super(); - } + /** * @param _impl l'implementation parente */ 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-10-15 17:32:24 UTC (rev 4067) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2008-10-15 17:46:32 UTC (rev 4068) @@ -161,17 +161,9 @@ final JComponent suiviPanel_; - /** - * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! - * RESERVE POUR LA SERIALIZATION DES DONNEES. - */ - public TrPostVisuPanel(){ - super(); - source_=null; - suiviPanel_=null; - } + public TrPostVisuPanel(final TrPostCommonImplementation _impl, final TrPostProjet _projet, final BCalqueLegende _leg, final TrPostSource _src) { this(_impl, _projet, false, _leg, _src); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-15 17:57:37
|
Revision: 4069 http://fudaa.svn.sourceforge.net/fudaa/?rev=4069&view=rev Author: hadouxad Date: 2008-10-15 17:54:53 +0000 (Wed, 15 Oct 2008) Log Message: ----------- - Icone sp?\195?\169cifique browser projet layout Modified Paths: -------------- 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/TrFileRenderer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrResource.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal16_browser.png branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal24_browser.png Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal16_browser.png =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal16_browser.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal24_browser.png =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal24_browser.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream 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-10-15 17:46:32 UTC (rev 4068) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java 2008-10-15 17:54:53 UTC (rev 4069) @@ -542,7 +542,7 @@ if (_lb == null) { launcher_.openLayoutPost(_f); } else { - _lb.setIcon(TrResource.getPostIcon()); + _lb.setIcon(TrResource.getPostLayoutIcon()); } return res; } 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-10-15 17:46:32 UTC (rev 4068) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java 2008-10-15 17:54:53 UTC (rev 4069) @@ -109,7 +109,7 @@ return TrResource.getMeshIcon(); } if (mng_.isPostFormat(_file)) { return TrResource.getPostIcon(); } - if (mng_.isPostLayoutFormat(_file)) { return TrResource.getPostIcon(); } + if (mng_.isPostLayoutFormat(_file)) { return TrResource.getPostLayoutIcon(); } if (mng_.getTxtFileFilter().accept(_file)) { return BuResource.BU.getToolIcon("texte"); } } return super.getIcon(_file); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrResource.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrResource.java 2008-10-15 17:46:32 UTC (rev 4068) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrResource.java 2008-10-15 17:54:53 UTC (rev 4069) @@ -58,6 +58,10 @@ return TrResource.TR.getIcon("prepro-post"); } + public static BuIcon getPostLayoutIcon() { + return TrResource.TR.getIcon("crystal16_browser.png"); + } + public static String getPostName() { return TrResource.getS("Post"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-15 17:36:25
|
Revision: 4067 http://fudaa.svn.sourceforge.net/fudaa/?rev=4067&view=rev Author: hadouxad Date: 2008-10-15 17:32:24 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Persistance des calques Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.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/sig/layer/FSigVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.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/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersist.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java 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-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -77,7 +77,7 @@ * @author Guillaume Desnoix , Axel von Arnim, Fred deniger */ public class ZEbliCalquesPanel extends BuPanel implements EbliFilleCalquesInterface, BCalqueContextuelListener, - CtuluImageProducer, BCalqueSaverTargetInterface, EbliFindable, ActionListener, ZebliCalqueSaver { + CtuluImageProducer, BCalqueSaverTargetInterface, EbliFindable, ActionListener { protected class AnimAdapter extends EbliAnimationSourceAbstract { @@ -271,6 +271,14 @@ BuMenu[] specificMenus_; + /** + * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! + * RESERVE POUR LA SERIALIZATION DES DONNEES. + */ + public ZEbliCalquesPanel(){ + + } + public ZEbliCalquesPanel(final CtuluUI _ui) { this(null, new ZEbliCalquePanelController(_ui)); } @@ -905,12 +913,19 @@ return null; } - public void loadCalque(File f, Map params) { - return; - } + - public void saveCalque(File _f) { - + /** + * retourne l'interface correspondante au niveauy m\xE9tier du calque. + * DOIT ETRE OVERRIDE par ses classes h\xE9riti\xE8res pour g\xE9rer la persistance des donn\xE9es. + * + * @param _f + * @return + */ + public ZebliCalqueDataPersitant getPersistantSaver() { + return null; } + + } \ No newline at end of file Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueDataPersitant.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -0,0 +1,28 @@ +package org.fudaa.ebli.calque; + +import java.util.Map; + + + +/** + * Interface definissant les datas persistantes du calque. + * Les classes qui impl\xE9mentent cette interface doivent etre SERIALIZABLE!!!! + * @author Adrien Hadoux + * + */ +public interface ZebliCalqueDataPersitant { + + /** + * Remplir les infos du calque correspondant + * @param panel + */ + public void fillInfoWith(ZEbliCalquesPanel panel); + + /** + * Methode qui genere le calque panel a partir des donn\xE9es + * @param parameters + * @return + */ + public ZEbliCalquesPanel generateCalquePanel(Map parameters); + +} 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-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -1,10 +1,15 @@ package org.fudaa.ebli.calque; import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.Map; import org.fudaa.ctulu.CtuluUI; +import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.courbe.EGGroupPersist; import com.thoughtworks.xstream.XStream; @@ -21,108 +26,201 @@ */ public class ZebliCalquePersist { - /** - * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et - * model... - */ - String directoryPath_; - Map parameters_; - + /** + * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et + * model... + */ + String directoryPath_; + Map parameters_; - private XStream parser_; - private static String MAINFILE = "descriptorCalque"; - private static String SPECIFIQUEFILE="specificDatas.xml"; - + private XStream parser_; + private static String MAINFILE = "descriptorCalque.xml"; + private static String DATA = "datas.xml"; + private static String SPECIFIQUEFILE="specificDatas.xml"; - public ZebliCalquePersist(String directoryPath_, Map parameters) throws IOException { - this.directoryPath_ = directoryPath_; - parameters_ = parameters; - } + public ZebliCalquePersist(String directoryPath_, Map parameters) throws IOException { + this.directoryPath_ = directoryPath_; + parameters_ = parameters; + } - /** - * Recupere le parser adequat. - * @return - */ - private XStream getParser(){ - if(parser_==null) - parser_=initXmlParser(); - return parser_; - } - /** - * Init le parser avec les alias adequats. - * @return - */ - private XStream initXmlParser(){ - XStream xstream = new XStream(new DomDriver()); - //-- creation des alias pour que ce soit + parlant dans le xml file --// - xstream.alias("Groupe", EGGroupPersist.class); - - return xstream; - } - - /** - * Retourne le path vers le fiochier principal des courbes - * @return - */ - private String getMainFilePath(){ - return directoryPath_+File.separator+MAINFILE; - } + /** + * Recupere le parser adequat. + * @return + */ + private XStream getParser(){ + if(parser_==null) + parser_=initXmlParser(); + return parser_; + } - - /** - * Retourne le chemin vers le fichier de datats specifiques. - * @return - */ - private String getSpecifiqueDataFilePath(){ - return directoryPath_+File.separator+SPECIFIQUEFILE; - } + /** + * Init le parser avec les alias adequats. + * @return + */ + private XStream initXmlParser(){ + XStream xstream = new XStream(new DomDriver()); + //-- creation des alias pour que ce soit + parlant dans le xml file --// + xstream.alias("Groupe", EGGroupPersist.class); - /** - * Enrtegistre le calque au format persistant xml. - * - * @param parameters - * des parametres supplementaires utiles. - * @throws IOException - */ - public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist) { - - // -- etape 1: on sauvegarde les datas du panel au format zip dans le main - // path principale --// - panelTopersist.saveCalque(new File(getMainFilePath())); - - // -- etape 2: data specifiques --// - - // on sauvegarde l'instance de la classe zebli pour pouvoir la rejouer par - // la suite - - } + return xstream; + } - /** - * Methode qui remplit le panel fournit en parametre avec les donn\xE9es - * sauvegardees. - * - * @param panelToFill - */ - public ZEbliCalquesPanel loadPersitCalqueXml(CtuluUI ui) { + /** + * Path vers els datas classique du calque + * @return + */ + private String getDataFilePath(){ + return directoryPath_+File.separator+DATA; + } - // -- Init: on init la creation du zeblicalquePanel avec l'ui - ZEbliCalquesPanel newPanel = new ZEbliCalquesPanel(ui); - - // -- etape 1 on lit les donn\xE9es sp\xE9cifiques pour conn\xE2itre le type d'objet - // \xE0 cr\xE9er --// - // -- etape 2: on lit les donn\xE9es zip et on remplit dans le calque - // pr\xE9alablement cr\xE9\xE9 - newPanel.loadCalque(new File(getMainFilePath()), parameters_); - - return newPanel; - } - - + /** + * Retourne le path vers le fiochier principal des courbes + * @return + */ + private String getMainFilePath(){ + return directoryPath_+File.separator+MAINFILE; + } + + + /** + * Retourne le chemin vers le fichier de datats specifiques. + * @return + */ + private String getSpecifiqueDataFilePath(){ + return directoryPath_+File.separator+SPECIFIQUEFILE; + } + + /** + * Enrtegistre le calque au format persistant xml. + * + * @param parameters + * des parametres supplementaires utiles. + * @throws IOException + */ + public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist) { + ObjectOutputStream out=null; + // -- etape 1: on sauvegarde les datasPersistantes du panel au format zip dans le main + // path principale --// + ZebliCalqueDataPersitant dataPersistantes= panelTopersist.getPersistantSaver(); + dataPersistantes.fillInfoWith(panelTopersist); + try { + out = getParser().createObjectOutputStream(new FileWriter(new File(getSpecifiqueDataFilePath()))); + 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(); + } + } + + //-- etape 2: on sauvegarde le type de zeblicalquePanel dans le fichier general --// +// try { +// out = getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); +// +// //-- donneees bidon --// +// //-- on enregistre le nb de pages --// +// out.writeInt(panelTopersist.getNumberOfPages()); +// //-- fin donn\xE9es bidons --// +// +// //-- on enregistre le type de calque --// +// out.writeObject(panelTopersist.getClass().toString()); +// +// } 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 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(getSpecifiqueDataFilePath()))); + ZebliCalqueDataPersitant dataPersistantes= (ZebliCalqueDataPersitant) in.readObject(); + + //-- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes + veritablePanel=dataPersistantes.generateCalquePanel(param); + + } 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; + } + + } Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java 2008-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -1,35 +0,0 @@ -package org.fudaa.ebli.calque; - -import java.io.File; -import java.util.Map; - - -/** - * Interface utilis\xE9e par le ZebliCalquePanel poru gerer sa persistance - * - * @author Adrien Hadoux - * - */ -public interface ZebliCalqueSaver { - - /** - * Methode qui permet de sauver un calque dans le fichier sp\xE9cifi\xE9. Cette - * methode doit etre overrid\xE9 a haut niveau (Fudaa) dans les classes - * h\xE9riti\xE8res de zebliCalquePanel - * - * @param f - */ - public void saveCalque(File f); - - /** - * Methode qui permet de charger un un calque a partir des donn\xE9es de ce - * fichier. Cette methode doit etre overrid\xE9 a haut niveau (Fudaa) dans les - * classes h\xE9riti\xE8res de zebliCalquePanel - * - * @param f - * @return - */ - public void loadCalque(File f, Map params); - - -} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -225,7 +225,7 @@ * @throws IllegalAccessException */ public EGGrapheTreeModel generateModelInstance(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException{ - if(className.startsWith("class ")); + if(className.startsWith("class ")) className=className.substring("class ".length()); Class myclass =Class.forName(className, true, Thread.currentThread(). getContextClassLoader()); 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-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -150,7 +150,7 @@ String pathCalque = (String) data; try { - calque_ = (new ZebliCalquePersist(pathCalque, parameters)).loadPersitCalqueXml((CtuluUI) parameters.get("ui")); + calque_ = (new ZebliCalquePersist(pathCalque, parameters)).loadPersitCalqueXml(parameters ); } catch (FileNotFoundException e) { // TODO Auto-generated catch block 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-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -169,6 +169,14 @@ private BuMenu edgeDisplayTools_; /** + * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! + * RESERVE POUR LA SERIALIZATION DES DONNEES. + */ + protected MvVisuPanel(){ + super(); + } + + /** * @param _impl l'implementation parente */ public MvVisuPanel(final FSigVisuPanelController _controller, final FudaaCommonImplementation _impl) { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -61,7 +61,19 @@ protected final FudaaCommonImplementation impl_; + + /** + * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! + * RESERVE POUR LA SERIALIZATION DES DONNEES. + */ + protected FSigVisuPanel(){ + super(); + mng_=null; + impl_=null; + } + + /** * @param _impl l'implementation parente */ public FSigVisuPanel(final FudaaCommonImplementation _impl) { @@ -223,35 +235,7 @@ getController().updateInfoComponent(); } - /** - * Methode qui permet de charger un calque fsigVisuPanel - */ - public void loadCalque(File f, Map params) { - - - try { - (new FudaaFilleVisuPersistence(this, getImpl())).restore(getImpl(), new FudaaSaveZipLoader(f), getImpl() - .getMainProgression()); - } catch (IOException e) { - e.printStackTrace(); - } - - - } - - /** - * Sauvegarde le calque au for\xE9at zip. - */ - public void saveCalque(File _f) { - - try { - (new FudaaFilleVisuPersistence(this, getImpl())).saveIn(new FudaaSaveZipWriter(_f), getImpl() - .getMainProgression()); - } catch (IOException e) { - e.printStackTrace(); - } - - } + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java 2008-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -41,6 +41,16 @@ */ public abstract class TrVisuPanel extends MvVisuPanel implements CtuluExportDataInterface, CtuluImageImporter { + + + /** + * NE JAMAIS UTILISER CE CONSTRUCTEUR!!! + * RESERVE POUR LA SERIALIZATION DES DONNEES. + */ + protected TrVisuPanel(){ + super(); + } + /** * @param _impl l'implementation parente */ @@ -48,6 +58,8 @@ super(_controller, _impl); } + + public TrVisuPanel(final FudaaCommonImplementation _impl) { super(_impl); } 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-10-15 09:50:47 UTC (rev 4066) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-10-15 17:32:24 UTC (rev 4067) @@ -90,1222 +90,1224 @@ */ 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); + /** + * 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); - // -- 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; + } - /** - * 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; - } + /** + * 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 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; - // } + // /** + // * 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; + // } - /** - * 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 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) { - if (isSourceLoaded(src.getFile().getAbsolutePath())) { - listeSrc_.remove(src); + if (isSourceLoaded(src.getFile().getAbsolutePath())) { + listeSrc_.remove(src); - // --recuperation du menu simul --// - final BuMenu menuSimul = getlisteMenuProjets_().get(n); + // --recuperation du menu simul --// + final BuMenu menuSimul = getlisteMenuProjets_().get(n); - // --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 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 le menuSimul de la liste --// - menuPost_.remove(menuSimul); + // -- on retire le menuSimul de la liste --// + menuPost_.remove(menuSimul); - // -- on retire de la liste des menus le menusimul et la liste des sous - // menus --// - getlisteMenuProjets_().remove(n); - getlisteSousMenuProjets_().remove(n); + // -- on retire de la liste des menus le menusimul et la liste des sous + // menus --// + getlisteMenuProjets_().remove(n); + getlisteSousMenuProjets_().remove(n); - // -- mise a jour de la barre des menus --// - impl_.getMainMenuBar().revalidate(); + // -- mise a jour de la barre des menus --// + impl_.getMainMenuBar().revalidate(); - 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(); + 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(); - return false; - } + return false; + } - } + } - /** - * 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()); - } + /** + * 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()); + } - 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; - } + 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 --// + /** + * formatte le titre + * + * @param file + * @return + */ + public String formatName(String title) { + // --suppression des trop long espaces du titre --// - title = title.replaceAll(" ", ""); + title = title.replaceAll(" ", ""); - return title; - } + return title; + } - /** - * 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) { + /** + * 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) { - final BuMenu menuSimul = new BuMenu((listeSrc_.size()) + ". " + formatFichier(_src.getFile()), "SIMULATION" - + (listeSrc_.size())); + final BuMenu menuSimul = new BuMenu((listeSrc_.size()) + ". " + formatFichier(_src.getFile()), "SIMULATION" + + (listeSrc_.size())); - // -- ajout du menu au menu post --// - getMenuPost().add(menuSimul); + // -- ajout du menu au menu post --// + getMenuPost().add(menuSimul); - // -- sauvegarde d une trace du menu dans la liste pour une suppression - // ulterieure --// - getlisteMenuProjets_().add(menuSimul); + // -- sauvegarde d une trace du menu dans la liste pour une suppression + // ulterieure --// + getlisteMenuProjets_().add(menuSimul); - final ArrayList<BuMenuItem> listSousMenus = new ArrayList<BuMenuItem>(); + final ArrayList<BuMenuItem> listSousMenus = new ArrayList<BuMenuItem>(); - final BuIcon ic = BuResource.BU.getIcon("aucun"); + final BuIcon ic = BuResource.BU.getIcon("aucun"); - 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)); + 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()); + 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()); - // -- ajout de la sous liste de menus pour la garder en memoire --// - getlisteSousMenuProjets_().add(listSousMenus); + // -- ajout de la sous liste de menus pour la garder en memoire --// + getlisteSousMenuProjets_().add(listSousMenus); - } - } + } + } - /** - * 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_; - } + /** + * 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_; + } - /** - * 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(); + /** + * 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); - } + Component comp = null; + if (getMenuPost().getMenuComponentCount() > 0) { + comp = getMenuPost().getMenuComponent(0); + // getMenuPost().remove(0); + } - getMenuPost().setIcon(null); - getMenuPost().setName("mnPost"); + getMenuPost().setIcon(null); + getMenuPost().setName("mnPost"); - menubar.add(getMenuPost(), 2); + 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("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() { - public void actionPerformed(final ActionEvent _e) { - createNewLayoutFrame(); + public void actionPerformed(final ActionEvent _e) { + createNewLayoutFrame(); - } - }); + } + }); - 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() { + 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) { - // -- affichage de la fenetre de gestion multi projet --// + 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); + if (!filleProjetctManager_.isVisible()) { + filleProjetctManager_.setSize(filleProjetctManager_.getSize().width, + filleProjetctManager_.getSize().height / 2); - impl_.addInternalFrame(filleProjetctManager_); - } + impl_.addInternalFrame(filleProjetctManager_); + } - } + } - }); - getMenuPost().add(item); - getMenuPost().addSeparator("Liste des Fichiers r\xE9sultats"); - // -- init de la liste des menus --// + }); + 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)); + // -- construction par defaut du premier menu de simulation --// + // construitMenuPostSpecifiqueSource(getSource(0)); - if (comp != null) { - getMenuPost().add(comp); - } + if (comp != null) { + getMenuPost().add(comp); + } - } + } - public List<BuMenu> getlisteMenuProjets_() { - if (listeMenuProjets_ == null) listeMenuProjets_ = new ArrayList<BuMenu>(); - return listeMenuProjets_; - } + public List<BuMenu> getlisteMenuProjets_() { + if (listeMenuProjets_ == null) listeMenuProjets_ = new ArrayList<BuMenu>(); + return listeMenuProjets_; + } - public List<ArrayList<BuMenuItem>> getlisteSousMenuProjets_() { - if (listeSousMenuProjets_ == null) listeSousMenuProjets_ = new ArrayList<ArrayList<BuMenuItem>>(); - return listeSousMenuProjets_; - } + 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); + /** + * 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)... [truncated message content] |
From: <had...@us...> - 2008-10-15 09:50:57
|
Revision: 4066 http://fudaa.svn.sourceforge.net/fudaa/?rev=4066&view=rev Author: hadouxad Date: 2008-10-15 09:50:47 +0000 (Wed, 15 Oct 2008) Log Message: ----------- mise en place du calque Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 09:49:39 UTC (rev 4065) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-10-15 09:50:47 UTC (rev 4066) @@ -9,8 +9,11 @@ import java.awt.Color; import java.awt.Frame; +import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.Map; import javax.swing.JComponent; @@ -28,6 +31,9 @@ import org.fudaa.ebli.commun.EbliFormatter; import org.fudaa.ebli.commun.EbliSelectionMode; import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; +import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; +import org.fudaa.fudaa.commun.save.FudaaSaveZipLoader; +import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; import org.fudaa.fudaa.sig.FSigAttibuteTypeManager; import com.memoire.bu.BuMenu; @@ -48,6 +54,11 @@ ThemeMenu theme_; + public void setActive(boolean _active) { + } + + + protected final FudaaCommonImplementation impl_; /** @@ -212,4 +223,35 @@ getController().updateInfoComponent(); } + /** + * Methode qui permet de charger un calque fsigVisuPanel + */ + public void loadCalque(File f, Map params) { + + + try { + (new FudaaFilleVisuPersistence(this, getImpl())).restore(getImpl(), new FudaaSaveZipLoader(f), getImpl() + .getMainProgression()); + } catch (IOException e) { + e.printStackTrace(); + } + + + } + + /** + * Sauvegarde le calque au for\xE9at zip. + */ + public void saveCalque(File _f) { + + try { + (new FudaaFilleVisuPersistence(this, getImpl())).saveIn(new FudaaSaveZipWriter(_f), getImpl() + .getMainProgression()); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + } \ 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-10-15 09:49:49
|
Revision: 4065 http://fudaa.svn.sourceforge.net/fudaa/?rev=4065&view=rev Author: hadouxad Date: 2008-10-15 09:49:39 +0000 (Wed, 15 Oct 2008) Log Message: ----------- mise en place du calque Modified Paths: -------------- 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/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-15 09:46:15 UTC (rev 4064) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-15 09:49:39 UTC (rev 4065) @@ -740,7 +740,8 @@ // -- creation des params pour les datas --// final HashMap<String, Object> parametres = new HashMap<String, Object>(); parametres.put("path", projet_.getAbsolutePath()); - + parametres.put("ui", ui_); + // -- etape 5 lecture de la liste des couples nomsfRAME /ID --// file = new File(projet_.getAbsolutePath() + File.separator + FileWidgetNames); final List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms = loadNomsFrames(file); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-15 09:46:29
|
Revision: 4064 http://fudaa.svn.sourceforge.net/fudaa/?rev=4064&view=rev Author: hadouxad Date: 2008-10-15 09:46:15 +0000 (Wed, 15 Oct 2008) Log Message: ----------- mise en place du calque Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-15 09:42:15 UTC (rev 4063) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-15 09:46:15 UTC (rev 4064) @@ -9,17 +9,8 @@ import java.io.IOException; -import com.db4o.ObjectContainer; -import com.db4o.ObjectSet; -import com.db4o.query.Query; - -import com.memoire.bu.BuCommonImplementation; -import com.memoire.bu.BuDesktop; -import com.memoire.fu.Fu; -import com.memoire.fu.FuLog; - +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.ProgressionInterface; - import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.calque.BCalquePersistenceGroupe; import org.fudaa.ebli.calque.BCalqueSaverInterface; @@ -28,6 +19,14 @@ import org.fudaa.ebli.calque.ZEbliFilleCalques; import org.fudaa.ebli.geometrie.GrBoite; +import com.db4o.ObjectContainer; +import com.db4o.ObjectSet; +import com.db4o.query.Query; +import com.memoire.bu.BuCommonImplementation; +import com.memoire.bu.BuDesktop; +import com.memoire.fu.Fu; +import com.memoire.fu.FuLog; + /** * @author fred deniger * @version $Id: FudaaFilleVisuPersistence.java,v 1.9 2007-06-20 12:23:38 deniger Exp $ @@ -53,12 +52,14 @@ /** * constructeur reserv\xE9 au ZEbliCalquesPanel - * @param _visu + * @param _calque */ - public FudaaFilleVisuPersistence(final ZEbliCalquesPanel _visu) { + public FudaaFilleVisuPersistence(final ZEbliCalquesPanel _calque, CtuluUI ui) { super(); FudaaSaveLib.configureDb4o(); - calquepanel_ = _visu; + ZEbliFilleCalques fille = new ZEbliFilleCalques(ui, _calque.getGcDonnees()); + calquepanel_ = _calque; + visu_ = fille; } /** @@ -66,19 +67,22 @@ * @param _writer * @param _prog */ - public void saveZEbliCalquesPanelIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { - try { - final BGroupeCalque donneesCalque = calquepanel_.getDonneesCalque(); - _writer.createDir(rep_, donneesCalque.getTousCalques().length + 1); - final BCalquePersistenceGroupe persistenceMng = donneesCalque.getGroupePersistenceMng(); - persistenceMng.setTop(true); - commitData(_writer.getDb(), persistenceMng.saveIn(donneesCalque, _writer, rep_ + '/', rep_), _prog); - } catch (final IOException _evt) { - FuLog.error(_evt); + // public void saveZEbliCalquesPanelIn(final FudaaSaveZipWriter _writer, final + // ProgressionInterface _prog) { + // try { + // final BGroupeCalque donneesCalque = calquepanel_.getDonneesCalque(); + // _writer.createDir(rep_, donneesCalque.getTousCalques().length + 1); + // final BCalquePersistenceGroupe persistenceMng = + // donneesCalque.getGroupePersistenceMng(); + // persistenceMng.setTop(true); + // commitData(_writer.getDb(), persistenceMng.saveIn(donneesCalque, _writer, + // rep_ + '/', rep_), _prog); + // } catch (final IOException _evt) { + // FuLog.error(_evt); + // + // } + // } - } - } - public void saveIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-15 09:42:29
|
Revision: 4063 http://fudaa.svn.sourceforge.net/fudaa/?rev=4063&view=rev Author: hadouxad Date: 2008-10-15 09:42:15 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 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-10-15 09:34:59 UTC (rev 4062) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-10-15 09:42:15 UTC (rev 4063) @@ -3,10 +3,14 @@ import java.awt.Dimension; import java.awt.Point; import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; import java.util.HashMap; import java.util.Map; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.calque.ZebliCalquePersist; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; @@ -27,15 +31,13 @@ // EbliWidgetVueCalque res; - public EbliWidgetCreatorVueCalque(final ZEbliCalquesPanel calque) { + public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque) { this(calque, null); } - public EbliWidgetCreatorVueCalque() { - + } - - public EbliWidgetCreatorVueCalque(final ZEbliCalquesPanel calque, final GrBoite _initZoom) { + public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque, GrBoite _initZoom) { super(); this.calque_ = calque; initZoom_ = _initZoom; @@ -46,31 +48,31 @@ * @param _dest le widget de destination * @param _legende l'adapteur pour la legende */ - public void updateLegend(final EbliWidgetBordureSingle _dest, final CalqueLegendeWidgetAdapter _legende) { - final Point positionLegende = new Point(); + public void updateLegend(EbliWidgetBordureSingle _dest, CalqueLegendeWidgetAdapter _legende) { + Point positionLegende = new Point(); positionLegende.x = _dest.getLocation().x + _dest.getIntern().getPreferredSize().width + 5; positionLegende.y = _dest.getPreferredLocation().y; - final EbliWidgetVueCalque vue = (EbliWidgetVueCalque) _dest.getIntern(); + EbliWidgetVueCalque vue = (EbliWidgetVueCalque) _dest.getIntern(); vue.nodeLegende = _legende.createLegende(positionLegende, _legende.getScene(), getBordure().getIntern().getId()); ((EbliWidgetControllerCalque) vue.getController()).setLegendeWidget(_legende); } - public EbliWidget create(final EbliScene _scene) { - final EbliWidgetVueCalque widgetCalque = new EbliWidgetVueCalque(_scene, calque_, initZoom_); + public EbliWidget create(EbliScene _scene) { + EbliWidgetVueCalque widgetCalque = new EbliWidgetVueCalque(_scene, calque_, initZoom_); res = new EbliWidgetBordureSingle(widgetCalque); res.setPreferredSize(new Dimension(200, 200)); widgetCalque.setController(new EbliWidgetControllerCalque(widgetCalque, res)); return res; } - public EbliNode duplicate(final EbliNode _nodeAdupliquer) { + public EbliNode duplicate(EbliNode _nodeAdupliquer) { - final EbliNode duplique = new EbliNodeDefault(); + EbliNode duplique = new EbliNodeDefault(); - final Map duplicOptions = new HashMap(); + Map duplicOptions = new HashMap(); duplicOptions.put("scene", getWidget().getEbliScene()); - final EbliWidgetCreatorVueCalque creator = new EbliWidgetCreatorVueCalque(getCalque().duplicate(duplicOptions), + EbliWidgetCreatorVueCalque creator = new EbliWidgetCreatorVueCalque(getCalque().duplicate(duplicOptions), getCalque().getVueCalque().getViewBoite()); duplique.setCreator(creator); @@ -83,7 +85,7 @@ // recopie des tailles duplique.setPreferedSize(_nodeAdupliquer.getPreferedSize()); // -- calcul nouvelle position - final Point nouvellePosition = new Point(getWidget().getLocation().x, (getWidget().getLocation().y + getWidget() + Point nouvellePosition = new Point(getWidget().getLocation().x, (int) (getWidget().getLocation().y + getWidget() .getClientArea().height)); duplique.setPreferedLocation(nouvellePosition); @@ -111,28 +113,55 @@ // return widgetCalque_; // } - public void setCalque(final ZEbliCalquesPanel calque) { + public void setCalque(ZEbliCalquesPanel calque) { this.calque_ = calque; } - public Object getPersistData(final Map parameters) { + + public Object getPersistData(Map parameters) { + // TODO Auto-generated method stub // -- generation d'un identifiant unique pour le repertoire du graphe --// // String - // pathUnique=parameters.get("pathGraphes")+File.separator+FuLib.clean(File.separator+parameters.get("nodeName"))+res.getIntern().getId(); - final String pathUnique = ManagerWidgetPersist.generateCalquePath((String) parameters.get("pathCalques"), res + // pathUnique=parameters.get("pathGraphes")+File.separator+FuLib.clean + // (File.separator+parameters.get("nodeName"))+res.getIntern().getId(); + String pathUnique = ManagerWidgetPersist.generateCalquePath((String) parameters.get("pathCalques"), res .getEbliScene().findByWidgetId(res.getId())); // - sauvegarde du contenu de l eggraphe dans un repertoire a part --// - final File createRep = new File(pathUnique); + File createRep = new File(pathUnique); if (createRep.mkdir() || createRep.isDirectory()) { // (new FudaaFilleVisuPersistence(getCalque())).saveZEbliCalquesPanelIn + try { + (new ZebliCalquePersist(pathUnique, parameters)).savePersitCalqueXml(getCalque()); + } catch (IOException e) { + e.printStackTrace(); + } + } return pathUnique; } - public void setPersistData(final Object data, final Map parameters) { - if (data == null) calque_ = new ZEbliCalquesPanel(null); + public void setPersistData(Object data, Map parameters) { + // TODO Auto-generated method stub + if (data == null) + calque_ = new ZEbliCalquesPanel(null); + else { + String pathCalque = (String) data; + + try { + calque_ = (new ZebliCalquePersist(pathCalque, parameters)).loadPersitCalqueXml((CtuluUI) parameters.get("ui")); + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } } + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-15 09:35:13
|
Revision: 4062 http://fudaa.svn.sourceforge.net/fudaa/?rev=4062&view=rev Author: hadouxad Date: 2008-10-15 09:34:59 +0000 (Wed, 15 Oct 2008) Log Message: ----------- mise en place du calque Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java 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-10-15 07:36:30 UTC (rev 4061) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-10-15 09:34:59 UTC (rev 4062) @@ -21,6 +21,7 @@ import java.awt.image.BufferedImage; import java.awt.print.PageFormat; import java.awt.print.Printable; +import java.io.File; import java.util.Map; import javax.swing.Action; @@ -76,7 +77,7 @@ * @author Guillaume Desnoix , Axel von Arnim, Fred deniger */ public class ZEbliCalquesPanel extends BuPanel implements EbliFilleCalquesInterface, BCalqueContextuelListener, - CtuluImageProducer, BCalqueSaverTargetInterface, EbliFindable, ActionListener { + CtuluImageProducer, BCalqueSaverTargetInterface, EbliFindable, ActionListener, ZebliCalqueSaver { protected class AnimAdapter extends EbliAnimationSourceAbstract { @@ -247,6 +248,10 @@ private BGroupeCalque gcDonnees_; + public BGroupeCalque getGcDonnees() { + return gcDonnees_; + } + public void setGcDonnees_(BGroupeCalque gcDonnees_) { this.gcDonnees_ = gcDonnees_; @@ -900,4 +905,12 @@ return null; } + public void loadCalque(File f, Map params) { + return; + } + + public void saveCalque(File _f) { + + } + } \ No newline at end of file Added: 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 (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-10-15 09:34:59 UTC (rev 4062) @@ -0,0 +1,128 @@ +package org.fudaa.ebli.calque; + +import java.io.File; +import java.io.IOException; +import java.util.Map; + +import org.fudaa.ctulu.CtuluUI; +import org.fudaa.ebli.courbe.EGGroupPersist; + +import com.thoughtworks.xstream.XStream; +import com.thoughtworks.xstream.io.xml.DomDriver; + + +/** + * Classe qui gere les diff\xE9rents fichiers pour la persistance du calque. Doit + * recevoir en parametre le path du repertoire dans lequel sera sauvegard\xE9 le + * calque. + * + * @author Adrien Hadoux + * + */ +public class ZebliCalquePersist { + + /** + * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et + * model... + */ + String directoryPath_; + Map parameters_; + + + private XStream parser_; + + private static String MAINFILE = "descriptorCalque"; + private static String SPECIFIQUEFILE="specificDatas.xml"; + + + + public ZebliCalquePersist(String directoryPath_, Map parameters) throws IOException { + this.directoryPath_ = directoryPath_; + parameters_ = parameters; + } + + + + /** + * Recupere le parser adequat. + * @return + */ + private XStream getParser(){ + if(parser_==null) + parser_=initXmlParser(); + return parser_; + } + + /** + * Init le parser avec les alias adequats. + * @return + */ + private XStream initXmlParser(){ + XStream xstream = new XStream(new DomDriver()); + //-- creation des alias pour que ce soit + parlant dans le xml file --// + xstream.alias("Groupe", EGGroupPersist.class); + + return xstream; + } + + + /** + * Retourne le path vers le fiochier principal des courbes + * @return + */ + private String getMainFilePath(){ + return directoryPath_+File.separator+MAINFILE; + } + + + /** + * Retourne le chemin vers le fichier de datats specifiques. + * @return + */ + private String getSpecifiqueDataFilePath(){ + return directoryPath_+File.separator+SPECIFIQUEFILE; + } + + /** + * Enrtegistre le calque au format persistant xml. + * + * @param parameters + * des parametres supplementaires utiles. + * @throws IOException + */ + public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist) { + + // -- etape 1: on sauvegarde les datas du panel au format zip dans le main + // path principale --// + panelTopersist.saveCalque(new File(getMainFilePath())); + + // -- etape 2: data specifiques --// + + // on sauvegarde l'instance de la classe zebli pour pouvoir la rejouer par + // la suite + + } + + /** + * Methode qui remplit le panel fournit en parametre avec les donn\xE9es + * sauvegardees. + * + * @param panelToFill + */ + public ZEbliCalquesPanel loadPersitCalqueXml(CtuluUI ui) { + + // -- Init: on init la creation du zeblicalquePanel avec l'ui + ZEbliCalquesPanel newPanel = new ZEbliCalquesPanel(ui); + + // -- etape 1 on lit les donn\xE9es sp\xE9cifiques pour conn\xE2itre le type d'objet + // \xE0 cr\xE9er --// + + // -- etape 2: on lit les donn\xE9es zip et on remplit dans le calque + // pr\xE9alablement cr\xE9\xE9 + newPanel.loadCalque(new File(getMainFilePath()), parameters_); + + return newPanel; + } + + +} Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalqueSaver.java 2008-10-15 09:34:59 UTC (rev 4062) @@ -0,0 +1,35 @@ +package org.fudaa.ebli.calque; + +import java.io.File; +import java.util.Map; + + +/** + * Interface utilis\xE9e par le ZebliCalquePanel poru gerer sa persistance + * + * @author Adrien Hadoux + * + */ +public interface ZebliCalqueSaver { + + /** + * Methode qui permet de sauver un calque dans le fichier sp\xE9cifi\xE9. Cette + * methode doit etre overrid\xE9 a haut niveau (Fudaa) dans les classes + * h\xE9riti\xE8res de zebliCalquePanel + * + * @param f + */ + public void saveCalque(File f); + + /** + * Methode qui permet de charger un un calque a partir des donn\xE9es de ce + * fichier. Cette methode doit etre overrid\xE9 a haut niveau (Fudaa) dans les + * classes h\xE9riti\xE8res de zebliCalquePanel + * + * @param f + * @return + */ + public void loadCalque(File f, Map params); + + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bma...@us...> - 2008-10-15 07:36:40
|
Revision: 4061 http://fudaa.svn.sourceforge.net/fudaa/?rev=4061&view=rev Author: bmarchan Date: 2008-10-15 07:36:30 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java Property Changed: ---------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java 2008-10-14 21:47:04 UTC (rev 4060) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java 2008-10-15 07:36:30 UTC (rev 4061) @@ -15,10 +15,10 @@ /** - * Une g\xE9om\xE9trie polygone. Un polygone est une polyligne ferm\xE9e. Sa premiere coordonn\xE9e et sa derni\xE8re sont identiques. - * Le nombre de coordonn\xE9es doit \xEAtre >= 4. + * Une g\xE9om\xE9trie polygone. Un polygone est une polyligne ferm\xE9e. Son premier et sont dernier point sont identiques. + * Le nombre de points doit \xEAtre >= 4. * @author Fred Deniger - * @version $Id: GISPolygone.java,v 1.10 2007-01-17 10:45:25 deniger Exp $ + * @version $Id$ */ public class GISPolygone extends LinearRing implements GISPointContainerInterface, GISLigneBrisee { protected long id_=GISGeometryFactory.INSTANCE.getNewId(); Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java ___________________________________________________________________ Added: svn:keywords + Revision Author URL Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-10-14 21:47:17
|
Revision: 4060 http://fudaa.svn.sourceforge.net/fudaa/?rev=4060&view=rev Author: deniger Date: 2008-10-14 21:47:04 +0000 (Tue, 14 Oct 2008) Log Message: ----------- mise en forme Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGAxe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGAxeRepereConfigurator.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeSurfacePainterConfigure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGDialog.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGFilleSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGFilleTree.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGroupPersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionDeplacementPoint.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGPaletteInfo.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSimplificationAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTableAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTableGraphePanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTransfoLib.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTreeCellRenderer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGVue.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/DefaultObjectSceneListener.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliNode.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliNodeDefault.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/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/EbliWidgetComponent.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/EbliWidgetControllerActionOnly.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerForGroup.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerMenuOnly.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetDBLFleche.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetEditModeListener.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFleche.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/EbliWidgetImage.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetSynchroniser.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/EbliWidgetTextLabel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandBringToFront.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandMasquer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandMove.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandRetaillage.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoBloque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoCreation.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoCut.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoPaste.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeBringToBack.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeDuplicate.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeUndoRedoGraphicalProperties.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliActionEditorOneClick.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionAlign.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBackGround.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionColorBackground.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionColorForeground.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionConfigure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionFont.java 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/EbliWidgetActionImageChooser.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRetaillageHorizontal.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRetaillageVertical.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionSimple.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/actions/WidgetConfigure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/animation/EbliWidgetAnimAdapter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/animation/EbliWidgetAnimTreeNode.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/animation/EbliWidgetAnimateTreeTableModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/animation/EbliWidgetAnimatedItem.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/animation/EbliWidgetAnimationComposition.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/calque/EbliWidgetCalqueLegende.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/EbliWidgetControllerLegendeCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.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/EbliWidgetFusionCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetPlage.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/creator/EbliWidgetCreator.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorClassLoader.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorDblFleche.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFleche.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorImage.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorShape.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextLabel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetGroupCreator.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreator.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorCircle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorEllipse.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFleche.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorRectangle.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/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetLine.java 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/GrapheCellRenderer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/GrapheTreeCellRenderer.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/graphe/WidgetLegendeManagerOLD.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/layout/GroupLayout.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/layout/OverlayLayoutGap.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliSceneSerializeXml.java 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/ManagerWidgetPersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliJXTreeTableCellRenderer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetJXTreeTableModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvActModifyDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvActView.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvControlResult.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvControllerSrc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvLayerGrid.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvParentInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvResource.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/MvSelectionNodeOrEltData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/action/MvItemActionsPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvCheckElementLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvCheckElementModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvCheckLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvCheckNodeLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvCheckNodeModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlAngle.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlArea.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlElementOrientation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlElementResult.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlItemUI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlNodeResult.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlOverstressed.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/controle/MvControlPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExport4T3.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportActAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportActDataStoreSrc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportActGrid.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportActInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportActSerafin.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportActX3D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportAdaptI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportChooseVarAndTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportCorEleBthGridAct.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecorator.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorEltData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorNodeData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorTranslation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFilterBuilderInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFilterBuilderSelectedElt.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFilterBuilderSelectedPoint.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFilterBuilderSimple.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFilterBuilderTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportPanelFilter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportPanelFilterDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportRubarTaskSkeleton.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSerafinFormatAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSourceFilterActivity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSrcTimeAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6Activity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6T3Activity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportTaskSkeleton.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportToNodeDataActivity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportToT3Activity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportX3D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/filter/MvFilterSelectedElement.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/filter/MvFilterSelectedNode.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/impl/MvActCheckDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/impl/MvActLoadDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/impl/MvInternalFrame.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MVFindActionFrontierPt.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MVFlecheLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvEdgeNumberLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvElementLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvElementNumberLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvFindActionNodeElt.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvFindComponentFrontierPt.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvFrontierLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvFrontierLayerAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvFrontierPointLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvFrontierPolygonLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvGridLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvIsoElementPainter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvIsoPaintersLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvNodeLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvNodeNumberLayer.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/model/Mv3DFrontierData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvEdgeModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvElementModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvElementModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvExpressionSupplierDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvExpressionSupplierElement.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvExpressionSupplierFrNode.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvExpressionSupplierNode.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvFlecheModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvFrontierModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvFrontierModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvInfoDelegate.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvInfoDelegateAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvIsoPainterComparator.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvIsoPainterDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvIsoPainterFond.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvIsoPainterNone.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvNodeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvNodeModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvNumberDelegate.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/model/MvNumberLayerI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/modify/MvModifyItemUI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/modify/MvModifyPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/persistence/MvFrontiere3DPersistence.java 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/MvProfileAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.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/meshviewer/profile/MvProfileCourbe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeModelInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFillePanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateVolumeBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileGridPalette.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileLayerModelForCourbe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeFille.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/meshviewer/profile/MvVolumeAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvVolumePanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/Tr.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrChainePreferencePanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrEditorImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrInvocationHandler.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrMeshImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrPostImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrProjectManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrSingleMainPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrSoftUpdater.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrSupervisor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrSupervisorImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrUncaughtExceptionHandler.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DBathy.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DCalque.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DImage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DInitialiser.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/TrBugCommentGenerator.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCommonImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeComboBoxRenderer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeComboboxModel.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/TrCourbeUseAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeUseCounter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeUseFinder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeUseFinderAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeUseResultsAbstract.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/common/TrExecBatchPreferencesPanel.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/TrFileFormatManager.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/common/TrGrapheSimpleTimeFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrGrapheTreeTimeFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrImplHelperAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrImplementationEditorAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrImportCourbeScopeManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrLauncher.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrLib.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrPostActionLigneCourants.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrPreferences.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjectDispatcherListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjectImportPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjectPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrProjetCommon.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrResource.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrRubarCourbeTarageUseFinder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrRubarCourbeUseFinder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrRubarCourbeUseResults.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrSuffixeDocListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrAreteExprSupplier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcBoundaryBlockModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcBoundaryBlockModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcBoundaryLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcBoundaryLayerAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcBoundaryLegendPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcBoundaryMiddleModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcBoundaryMiddleModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcPointModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBordTraceLigneData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBoundaryLineEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrExpressionSupplierForData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrFilleVisu.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrFindActionFrontierPt.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrGisProjectEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrIconeInput.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrIconeOutput.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrInfoSenderDelegate.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrInfoSenderH2dDelegate.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrIsoPainter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrIsoPainterElement.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrLayerMulti.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrRefluxBcBoundaryMiddleLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrRubarAreteEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSIZone.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSaisiePoint.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiFlecheModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiInterpolAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiNodeLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiNodeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiPlanEditorPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiPlanLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiProfilLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiProfilLayerProperties.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiProfilModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiProfileSplitter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiZoneOperation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSolutionInitModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrValuesEditorBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVarTableModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportFilterItemHauteur.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportFilterItemHauteurAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportFilterItemHauteurTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportPanelFilterFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRefluxSovAct.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRefluxSovAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRubarDonneesBrutesAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRubarInxCoxAct.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/persistence/TrPostFlecheLayerPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/persistence/TrPostIsoLayerPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/persistence/TrSiPlanLayerPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/persistence/TrSiProfilLayerPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrComputeLigneCourantTrajectoire.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrFrontierLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayerConfigure.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayerSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLineAdder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLineWizard.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLineWizardListValue.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoModelAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoModelEltDataAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostAnalyze.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeAddVariableAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeRemoveVariableAction.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/TrPostDataCreated.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedConstant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedCstTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedCstTimeSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedExpr.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedFroud.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedImport.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedMoins.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedNorm.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedNorme3D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedPlus.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedRubarBathy.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedRubarVitesse.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedStatistic.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationActions.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditCommonPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditCstPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditExprPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditStatisticPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataInfoDoc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataMinMaxGlobalItem.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataUserVarModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataVecteur.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostExprDataSupplier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostExprFlecheSupplier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterConfigure.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterDefaultValuePanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterHauteur.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterHauteurElement.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterHauteurEnvRubar.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterHauteurPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterSelecteur.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFilterVarPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheContentDefaut.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheLayerSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostImportProjetTableModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInfoDelegate.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInspector.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInspectorPanelBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInspectorReaderReflux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInspectorReaderRubar.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInspectorReaderSerafin.java 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/TrPostMinMaxTableModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostMinPaletteTableModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostModelInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostPaletteTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProfileFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjectCompPanel.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/TrPostProjetChooser.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjetCompTimeStepPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjetsManagerFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarBcEdgeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarEdgeFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarEdgeTreeFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarEdgesResults.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarEnvFlecheContent.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarEnvModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarFmtModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarLiminFilleSimple.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarLiminFilleTree.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarLimniMng.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarLoader.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarOuvrageModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarSpecificAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostScene.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSource.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceComparator.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceComparatorBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceOneTimeStep.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceProjected.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceReflux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceRubar.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceRubarMaxContainer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceRubarNodeBathyAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceRubarZFN.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceSerafin.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceTelemac3D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTimeFmtPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTimeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTimeModelSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostValueTableModel.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/TrPostVisuPanelRubar.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrIsoLineAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionAddPointFromWidgetCalque.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionAddPointFromWidgetCalque2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionBilan.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChangeSceneForWidget.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChooseAndCreateCalque.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionCubature.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionDuplicate.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionCalques.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionGraphes.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionOpenSrc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionRemoveSrc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostCourbeAddPointsAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostProfileAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostVolumeAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogCubature.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogLigneCourants.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/TrPostWizardCreateScope.java 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/TrPostWizardProfilSpatial.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/TrPostFileFormat.java 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/save/TrPostProjetSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrBcNodeLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxAppliManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxBcNodeLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxBoundaryEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxBoundaryMiddleLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxCourbeUseFinder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxCourbeUseResult.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxElementModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxExecPreferencesPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxFilleProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxForceEnableAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxImplHelper.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxInfoSenderDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxNormaleModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxProjectDispatcherListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxProjectFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxPropEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxRadiationVentPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxTimeStepsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxValueEditorPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxVisuPanelModelListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarAppliManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarApportIsoPainter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarAreteLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarAreteModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarAreteModelDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarAreteModelProject.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarBcAreteDefaultModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarBcAreteLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarCINLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesNuageLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarElementEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarElementModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarElementSIModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarEvolutionManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarExecPreferencesPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileBrutesState.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileBrutesStateNuage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileState.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateAPP.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateCIN.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateCLI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateDAT.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateDIF.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateDTR.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateFRT.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateMAI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateMng.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateOUV.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStatePAR.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFileStateTAR.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFilleProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarFlowrateGroupEditorPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarGridLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarImplHelper.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarInfoSenderDelegate.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarLimniModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarLimniSaisie.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarNewProjectPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageConfiguration.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageEditorFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageEditorPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageLayerModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvragePaletteIdentifier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageSaisie.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarParallelogrammeTableModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarParameters.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarProject.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarProjectDispatcherListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarProjectFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarProjectReloader.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarRegularGridEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarSIEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarSILayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarTarageCourbesManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarVisuPanelModelListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrMatisseConvertGUI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemac2dParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemac2dProject.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacAppliManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBcBoundaryBlockLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBcPointLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBcPointModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryBlockLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryGrapheSimpleModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryPtsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryVariableEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacCommunParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacCommunProjectListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacCommunProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacCulvertEndEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacDefaultPropertiesEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacDurationEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacExecPreferencesPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacFindBoundary.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacFrontierNumberIterator.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacFrontierNumberIteratorAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacImplHelper.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacInfoSenderDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacMatisseExec.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/o... [truncated message content] |
From: <bma...@us...> - 2008-10-14 20:16:55
|
Revision: 4059 http://fudaa.svn.sourceforge.net/fudaa/?rev=4059&view=rev Author: bmarchan Date: 2008-10-14 20:16:39 +0000 (Tue, 14 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionLigneBrisee.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java 2008-10-14 15:20:01 UTC (rev 4058) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java 2008-10-14 20:16:39 UTC (rev 4059) @@ -15,6 +15,8 @@ /** + * Une g\xE9om\xE9trie polygone. Un polygone est une polyligne ferm\xE9e. Sa premiere coordonn\xE9e et sa derni\xE8re sont identiques. + * Le nombre de coordonn\xE9es doit \xEAtre >= 4. * @author Fred Deniger * @version $Id: GISPolygone.java,v 1.10 2007-01-17 10:45:25 deniger Exp $ */ Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionLigneBrisee.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionLigneBrisee.java 2008-10-14 15:20:01 UTC (rev 4058) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionLigneBrisee.java 2008-10-14 20:16:39 UTC (rev 4059) @@ -132,6 +132,14 @@ addPolygone(_g, null, _cmd); } + /** + * Ajoute un polygone avec ses datas. + * Pour un data atomique, le nombre de valeurs du tableau peut \xEAtre \xE9gal a nb points-1. Le data atomique est alors recr\xE9\xE9 + * avec nb points. La derniere valeur n'est pas prise en compte par le polygone, mais assure l'int\xE9grit\xE9 de la GISZoneCollection. + * @param _g Le polygone. + * @param _data Les datas pour chaque attribut + * @param _cmd LE manager de commandes. + */ public void addPolygone(final GISPolygone _g, final Object[] _data, final CtuluCommandContainer _cmd) { if (isGeomModifiable_) { super.geometry_.add(_g, Arrays.asList(createAttributeList(_data, _g, true)), _cmd); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-14 15:20:25
|
Revision: 4058 http://fudaa.svn.sourceforge.net/fudaa/?rev=4058&view=rev Author: hadouxad Date: 2008-10-14 15:20:01 +0000 (Tue, 14 Oct 2008) Log Message: ----------- - Persistance des variables user par projet trpostsource - Test unitaires: les variables sont bien enregistr?\195?\169es et recharg?\195?\169es dans les projets. - Cr?\195?\169ation d'un r?\195?\169pertoire a part pour les texte - Refactorisation de la persistance .POST - cr?\195?\169ation de fileFormat - cr?\195?\169ation de filefilter - Gestion du chargement depuis le superviseur - Fichier setup.Post inclus dans le r?\195?\169pertoire du projet qu'il faut cliquer pour charger le projet. - Gestion des filters sp?\195?\169cifiques pour les post layouts - Icone informe pour le fichier setup.post qu'il est executable - Mise en place Enregistrement/chargement des donn?\195?\169es sp?\195?\169cifiques des graphes m?\195?\169tier du post: - gestion poru le trpostcourbeTreeModel - gestion pour le mvprofilecourbeTreemodel - refactorisation du mvprofiletreemodel: - recuperation de la ligne qui a servi a construire le graphe dans le MvProfileBuilder. - Mise en place de la sauvegarde du zeblicalquePanel. Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsBuilder.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.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/creator/EbliWidgetCreatorTextEditor.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/persist/ManagerWidgetPersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.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/TrLauncherDefault.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/TrFileFormatManager.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/common/TrLauncher.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.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/TrPostDataCreationPanel.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/TrPostUserVariableSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- 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/TrPostFileFormat.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsBuilder.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsBuilder.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsBuilder.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -13,6 +13,7 @@ import com.memoire.fu.Fu; import com.memoire.fu.FuLog; +import com.vividsolutions.jts.geom.LineString; import org.fudaa.ctulu.ProgressionInterface; @@ -26,11 +27,16 @@ final EfLineIntersectionsCorrectionTester tester_; final TIntObjectHashMap pool_ = new TIntObjectHashMap(20); - public EfLineIntersectionsResultsBuilder(final EfLineIntersectionsResultsI _res, + + private final LineString initLine_; + + + public EfLineIntersectionsResultsBuilder(final LineString initLine,final EfLineIntersectionsResultsI _res, final EfLineIntersectionsCorrectionTester _tester) { super(); res_ = _res; tester_ = _tester; + initLine_=initLine; } public boolean isPresentInPool(int _tIdx) { @@ -63,4 +69,8 @@ public EfLineIntersectionsResultsI getInitRes() { return res_; } + +public LineString getInitLine_() { + return initLine_; } +} Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -105,6 +105,10 @@ final boolean forMesh_; final EfGridDataInterpolator grid_; + + /** + * La ligne initialement utilis\xE9e poru g\xE9n\xE9rer la courbe depuis le calque. + */ final LineString initLine_; final boolean isInit_; final BitSet isOut_; @@ -145,7 +149,7 @@ } public EfLineIntersectionsResultsBuilder createBuilder(EfLineIntersectionsCorrectionTester _tester) { - return new EfLineIntersectionsResultsBuilder(getDefaultRes(), _tester); + return new EfLineIntersectionsResultsBuilder(initLine_,getDefaultRes(), _tester); } public EfLineIntersectionsResultsMng extract(final int _i1, final int _i2) { 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -101,12 +101,12 @@ private void testForCorrector(EfLineIntersectionsResultsI _mng) { - EfLineIntersectionsResultsBuilder builder = new EfLineIntersectionsResultsBuilder(_mng, null); + EfLineIntersectionsResultsBuilder builder = new EfLineIntersectionsResultsBuilder(null,_mng, null); EfLineIntersectionsResultsI res = builder.createResults(0, null); assertNotNull(res); assertTrue(_mng == res); - builder = new EfLineIntersectionsResultsBuilder(_mng, new DefaultTester()); + builder = new EfLineIntersectionsResultsBuilder(null,_mng, new DefaultTester()); res = builder.createResults(0, null); assertNotNull(res); assertFalse(_mng == res); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -157,5 +157,24 @@ * @param _duplicator TODO */ public EGGrapheModel duplicate(EGGrapheDuplicator _duplicator); + + + + /** + * Retourne les donn\xE9es persistantes sp\xE9cifique du graphe model. + * Est utile pour les graphes de haut niveau m\xE9tier + * Ces donn\xE9es pourront etre facilement serializee par un parser xml, bdd, ou texte + * @return + */ + public Object getSpecificPersitDatas(); + + + /** + * Insere les donn\xE9es sp\xE9cifiques persistantes dans le modele. + *Ces donn\xE9es proviennent de fichier de sauvegardes (xml,texte,bdd...) + * @return + */ + public void setSpecificPersitDatas(Object sepcPersitData); + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -40,6 +40,7 @@ private XStream parser_; private static String MAINFILE="descriptorGraphe.xml"; + private static String SPECIFIQUEFILE="specificDatas.xml"; private static String COURBEDIRECTORY="courbes"; @@ -90,7 +91,16 @@ return directoryPath_+File.separator+MAINFILE; } + /** + * Retourne le chemin vers le fichier de datats specifiques. + * @return + */ + private String getSpecifiqueDataFilePath(){ + return directoryPath_+File.separator+SPECIFIQUEFILE; + } + + /** * Retourne la liste persistante des fichiers * @return */ @@ -119,10 +129,13 @@ * @param parameters des parametres supplementaires utiles. * @throws IOException */ - public void savePersitGrapheXml(EGGraphe grapheTopersist) throws IOException{ + public void savePersitGrapheXml(EGGraphe grapheTopersist) { String mainfile=getMainFilePath(); //-- outputstream du xstream pour enregistrement des diff\xE9rents groupes--// - ObjectOutputStream out = getParser().createObjectOutputStream(new FileWriter(mainfile)); + ObjectOutputStream out=null; + try { + out = getParser().createObjectOutputStream(new FileWriter(mainfile)); + //-- enregistrement des courbes --// // strategy pour la liste xml: aun fichier par courbe. File fichierCourbes=getDirectoryCurves(); @@ -173,7 +186,39 @@ out.writeObject(gp); } } - out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally{ + try { + out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + //-- on enregistre les donn\xE9es specifiques en fonction du type de grapheModel --// + Object specifiquesDatas=grapheTopersist.getModel().getSpecificPersitDatas(); + if(specifiquesDatas ==null ) + return; + try { + out = getParser().createObjectOutputStream(new FileWriter(new File(getSpecifiqueDataFilePath()))); + out.writeObject(specifiquesDatas); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally{ + try { + out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } /** Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -799,4 +799,16 @@ return duplic; } +@Override +public Object getSpecificPersitDatas() { + // TODO Auto-generated method stub + return null; +} + +@Override +public void setSpecificPersitDatas(Object sepcPersitData) { + // TODO Auto-generated method stub + +} + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -1124,4 +1124,16 @@ this.selectionModel_ = selectionModel_; } +@Override +public Object getSpecificPersitDatas() { + // TODO Auto-generated method stub + return null; +} + +@Override +public void setSpecificPersitDatas(Object sepcPersitData) { + // TODO Auto-generated method stub + +} + } \ No newline at end of file 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -2,10 +2,13 @@ import java.awt.Dimension; import java.awt.Point; +import java.io.File; +import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.courbe.EGGraphePersist; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; @@ -14,6 +17,7 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; +import org.fudaa.ebli.visuallibrary.persist.ManagerWidgetPersist; import org.w3c.dom.Element; public class EbliWidgetCreatorVueCalque implements EbliWidgetCreator { @@ -115,7 +119,19 @@ @Override public Object getPersistData(Map parameters) { // TODO Auto-generated method stub - return null; + //-- generation d'un identifiant unique pour le repertoire du graphe --// + // String pathUnique=parameters.get("pathGraphes")+File.separator+FuLib.clean(File.separator+parameters.get("nodeName"))+res.getIntern().getId(); + String pathUnique=ManagerWidgetPersist.generateCalquePath((String)parameters.get("pathCalques"), res.getEbliScene().findByWidgetId(res.getId())); + //- sauvegarde du contenu de l eggraphe dans un repertoire a part --// + + File createRep=new File(pathUnique); + if( createRep.mkdir() || createRep.isDirectory()){ + // (new FudaaFilleVisuPersistence(getCalque())).saveZEbliCalquesPanelIn + } + + + + return pathUnique; } @Override Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextEditor.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextEditor.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -95,7 +95,7 @@ //ecriture du contenu html dans ce fichier FileWriter writer; try { - String path=(String)parameters.get("path"); + String path=(String)parameters.get("pathTexte"); if(path !=null){ File contenu=new File(path+File.separator+"contenu"+parameters.get("nodeName")+getWidget().getId()+".html"); writer = new FileWriter(contenu); 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -136,7 +136,7 @@ @Override public void setPersistData(Object data, Map parameters) { // TODO Auto-generated method stub - EGGrapheModel modele; + EGGrapheModel modele=null; if(data==null) modele=new EGGrapheTreeModel(); else{ Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/ManagerWidgetPersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/ManagerWidgetPersist.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/ManagerWidgetPersist.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -49,9 +49,18 @@ } +/** + * Genere un path vers l objetc calque + * @param path + * @param nodeCalque + * @return + */ + public static String generateCalquePath(String path, EbliNode nodeCalque){ + + return path+File.separator+File.separator+FuLib.clean(nodeCalque.getTitle())+nodeCalque.getWidget().getId(); + + } - - Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -24,6 +24,7 @@ import org.fudaa.ebli.calque.BCalquePersistenceGroupe; import org.fudaa.ebli.calque.BCalqueSaverInterface; import org.fudaa.ebli.calque.BGroupeCalque; +import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.calque.ZEbliFilleCalques; import org.fudaa.ebli.geometrie.GrBoite; @@ -32,16 +33,54 @@ * @version $Id: FudaaFilleVisuPersistence.java,v 1.9 2007-06-20 12:23:38 deniger Exp $ */ public class FudaaFilleVisuPersistence implements FudaaSavable { - - final ZEbliFilleCalques visu_; + + ZEbliFilleCalques visu_; String rep_ = "data"; - + /** + * Cas ou l'on veut sauvegarder directement un calquePanel + */ + ZEbliCalquesPanel calquepanel_; + + /** + * constructeur reserv\xE9 au ZEbliFilleCalques + * @param _visu + */ public FudaaFilleVisuPersistence(final ZEbliFilleCalques _visu) { super(); FudaaSaveLib.configureDb4o(); visu_ = _visu; } + + /** + * constructeur reserv\xE9 au ZEbliCalquesPanel + * @param _visu + */ + public FudaaFilleVisuPersistence(final ZEbliCalquesPanel _visu) { + super(); + FudaaSaveLib.configureDb4o(); + calquepanel_ = _visu; + } + /** + * Methode utilisee pour sauvegarder le zeblicalquepanel. + * @param _writer + * @param _prog + */ + public void saveZEbliCalquesPanelIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { + try { + final BGroupeCalque donneesCalque = calquepanel_.getDonneesCalque(); + _writer.createDir(rep_, donneesCalque.getTousCalques().length + 1); + final BCalquePersistenceGroupe persistenceMng = donneesCalque.getGroupePersistenceMng(); + persistenceMng.setTop(true); + commitData(_writer.getDb(), persistenceMng.saveIn(donneesCalque, _writer, rep_ + '/', rep_), _prog); + } catch (final IOException _evt) { + FuLog.error(_evt); + + } + } + + + public void saveIn(final FudaaSaveZipWriter _writer, final ProgressionInterface _prog) { try { final BGroupeCalque donneesCalque = visu_.getDonneesCalque(); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -83,8 +83,13 @@ public final CtuluUI ui_; + /** + * La ligne originelle qui a servie a creer lea courbe + */ + private final LineString initLine_; + public MvProfileBuilder(final MvProfileTarget _data, final ZEbliCalquesPanel _panel, - EfLineIntersectionsCorrectionTester _tester) { + EfLineIntersectionsCorrectionTester _tester,final LineString _selected) { super(); data_ = _data; panel_ = _panel; @@ -93,6 +98,7 @@ act_ = new EfLineIntersectorActivity(data_.getData(), data_.getInterpolator()); ui_ = panel_.getCtuluUI(); timeModel_ = _data.getTimeModel(); + initLine_=_selected; } MvExportChooseVarAndTime createVarTimeChooser(final String _help) { @@ -455,7 +461,8 @@ public EfLineIntersectionsResultsBuilder getMeshesResultBuilder(final ProgressionInterface _prog) { EfLineIntersectionsResultsMng meshes = getMeshResultsMng(_prog); - if (meshesResultBuilder_ == null) meshesResultBuilder_ = new EfLineIntersectionsResultsBuilder(meshes + + if (meshesResultBuilder_ == null) meshesResultBuilder_ = new EfLineIntersectionsResultsBuilder(initLine_,meshes .getDefaultRes(), tester_); return meshesResultBuilder_; } @@ -467,7 +474,7 @@ public EfLineIntersectionsResultsBuilder getNodeResultBuilder(final ProgressionInterface _prog) { EfLineIntersectionsResultsMng nodes = getNodeResultsMng(_prog); - if (nodesResultBuilder_ == null) nodesResultBuilder_ = new EfLineIntersectionsResultsBuilder(nodes.getDefaultRes(), + if (nodesResultBuilder_ == null) nodesResultBuilder_ = new EfLineIntersectionsResultsBuilder(initLine_,nodes.getDefaultRes(), tester_); return nodesResultBuilder_; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -26,7 +26,7 @@ public MvProfileBuilderFromLine(final MvProfileTarget _data, final CtuluUI _ui, final LineString _line, final ZEbliCalquesPanel _panel, EfLineIntersectionsCorrectionTester _tester) { - super(_data, _panel, _tester); + super(_data, _panel, _tester,_line); selectedLine_ = _line; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -73,7 +73,7 @@ public MvProfileBuilderFromTree(final MvProfileTarget _data, final CtuluUI _ui, final LineString _selected, final ZEbliCalquesPanel _panel, EfLineIntersectionsCorrectionTester _tester) { - super(_data, _panel, _tester); + super(_data, _panel, _tester,_selected); lineTreeModel_ = new CalqueFindCourbeTreeModel(null, _panel.getDonneesCalque()); initSelected_ = _selected; calque_ = _panel; 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -553,8 +553,8 @@ builderMesh_ = null; resNode_ = _newRes; resMesh_ = _newResMesh; - if (resNode_ != null) builderNode_ = new EfLineIntersectionsResultsBuilder(resNode_.getDefaultRes(), tester_); - if (resMesh_ != null) builderMesh_ = new EfLineIntersectionsResultsBuilder(resMesh_.getDefaultRes(), tester_); + if (resNode_ != null) builderNode_ = new EfLineIntersectionsResultsBuilder(_newRes.getInitLine(),resNode_.getDefaultRes(), tester_); + if (resMesh_ != null) builderMesh_ = new EfLineIntersectionsResultsBuilder(_newRes.getInitLine(),resMesh_.getDefaultRes(), tester_); if (paletteGrid_ != null) { BuLib.invokeLater(new Runnable() { public void run() { @@ -679,4 +679,18 @@ public void setTarget_(MvProfileTarget target_) { this.target_ = target_; } + + +@Override +public Object getSpecificPersitDatas() { + // TODO Auto-generated method stub + return "JE suis une courbe de profile spatial de la mort"; } + +@Override +public void setSpecificPersitDatas(Object sepcPersitData) { + // TODO Auto-generated method stub + super.setSpecificPersitDatas(sepcPersitData); +} + +} 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -58,6 +58,7 @@ import org.fudaa.fudaa.tr.common.TrLib; import org.fudaa.fudaa.tr.common.TrPreferences; import org.fudaa.fudaa.tr.common.TrResource; +import org.fudaa.fudaa.tr.post.TrPostProjet; import org.fudaa.fudaa.tr.reflux.TrRefluxImplHelper; import org.fudaa.fudaa.tr.rubar.TrRubarImplHelper; import org.fudaa.fudaa.tr.telemac.TrTelemacImplHelper; @@ -423,6 +424,41 @@ mesh.cmdOuvrirFile(_f); } + + /** + * Methode appelee pour generer le trpost avec le ficheir de layout ouvert. + */ + public TrPostImplementation openLayoutPost(final File _f) { + final TrPostImplementation alreadyOpened = findPostWithOpenedFile(_f); + if (alreadyOpened != null) { + alreadyOpened.setMainErrorAndClear(TrLib.getMessageAlreadyOpen(_f)); + alreadyOpened.getFrame().setVisible(true); + alreadyOpened.getFrame().setState(Frame.NORMAL); + alreadyOpened.getFrame().requestFocus(); + // pour Rubar +// alreadyOpened.getCurrentProject().activate(_f); + return alreadyOpened; + + } + + final TrPostImplementation post = (TrPostImplementation) launch(null, TrLauncherDefault.this, + new TrPostImplementation()); + BuLib.invokeLater(new Runnable() { + + public void run() { + if (_f != null) { + + post.cmdOuvrirLayoutFile(_f); + } + } + + }); + + return post; + + } + + public TrPostImplementation openPost(final File _f) { final TrPostImplementation alreadyOpened = findPostWithOpenedFile(_f); if (alreadyOpened != null) { @@ -436,6 +472,7 @@ } + final TrPostImplementation post = (TrPostImplementation) launch(null, TrLauncherDefault.this, new TrPostImplementation()); BuLib.invokeLater(new Runnable() { 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -44,6 +44,8 @@ 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; @@ -467,6 +469,16 @@ } return res; } +// if (getFileFilterFor(TrPostFileFormat.getInstance()).accept(null, name)) { +// final String res = TrResource.getS("Projet Post"); +// if (_lb == null) { +// //launcher_.ouvrirHydEditor(FileFormatSoftware.RUBAR_IS.name, _file); +// } else { +// _lb.setIcon(getFileFilterFor(TrPostFileFormat.getInstance()).getIcon()); +// } +// return res; +// } + return null; } @@ -484,6 +496,26 @@ return null; } + /** + * Methode appelee pour ouvrir un fichier layout + * @param _f + * @param _lb + * @return + */ + protected String ouvrirPostLayout(final VfsFile _f, final AbstractButton _lb) { + //--si le format est du type *.POST + if (isPostLayoutFormat(_f)) { + final String res = TrResource.getPostName(); + if (_lb == null) { + launcher_.openLayoutPost(_f); + } else { + _lb.setIcon(TrResource.getPostIcon()); + } + return res; + } + return null; + } + protected String ouvrirPost(final VfsFile _f, final AbstractButton _lb) { if (isPostFormat(_f)) { final String res = TrResource.getPostName(); @@ -513,6 +545,14 @@ 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)) { if (_lb != null) { @@ -779,6 +819,15 @@ } /** + * Retourne true si il s'agit d'un format layout + * @param _file + * @return + */ + public boolean isPostLayoutFormat(final File _file) { + return TrPostFileFormat.getInstance().createFileFilter().accept(_file); + } + + /** * @param _file le fichier a tester * @return true si supporte par l'editeur */ Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileFormatManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileFormatManager.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileFormatManager.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -27,6 +27,7 @@ import org.fudaa.dodico.telemac.io.SerafinFileFormat; import org.fudaa.dodico.trigrid.TrigridFileFormat; import org.fudaa.fudaa.commun.courbe.FudaaCourbeImporter; +import org.fudaa.fudaa.tr.post.persist.TrPostFileFormat; import org.fudaa.fudaa.tr.reflux.TrRefluxImplHelper; import org.fudaa.fudaa.tr.rubar.TrRubarImplHelper; import org.fudaa.fudaa.tr.telemac.TrTelemacImplHelper; @@ -74,6 +75,8 @@ r.add(DunesFileFormat.getInstance()); } r.add(SerafinFileFormat.getInstance()); + + return getArray(r); } @@ -170,6 +173,8 @@ r.add(RefluxRefondeSolutionFileFormat.getInstance()); r.add(SerafinFileFormat.getInstance()); } + + return getArray(r); } 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -114,6 +114,9 @@ if (mng_.isPostFormat(_file)) { return TrResource.getPostIcon(); } + if (mng_.isPostLayoutFormat(_file)) { + return TrResource.getPostIcon(); + } if (mng_.getTxtFileFilter().accept(_file)) { return BuResource.BU.getToolIcon("texte"); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrLauncher.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrLauncher.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrLauncher.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -47,7 +47,13 @@ */ TrPostImplementation openPost(File _f); + /** + * @param _f le fichier layout a ouvrir dans la fenetre de post. + */ + TrPostImplementation openLayoutPost(File _f); + + /** * @param _f le fichier a ouvrir dans la fenetre de visu de maillage. */ void openMeshView(File _f); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -108,6 +108,7 @@ BuLib.invokeNowOrLater(new Runnable() { public void run() { setEnabledForAction("ENREGISTRER", true); + setEnabledForAction("ENREGISTRERSOUS", true); setEnabledForAction("IMPORTER", true); setEnabledForAction(getImportResultsAct(), true); setEnabledForAction("IMPORT_PROJECT", true); @@ -163,7 +164,7 @@ if(reponse==JOptionPane.OK_OPTION){ c_.getManager().clearProject(); } - c_.getManager().loadProject(); + c_.getManager().loadProject(false,null); } else @@ -182,11 +183,23 @@ //c_.save(TrPostCommonImplementation.this, createProgressionInterface(this)); //-- enregistrement sauce widget --// - c_.getManager().saveProject(); + c_.getManager().saveProject(false); } }.start(); - } + }else if ("ENREGISTRERSOUS".equals(com) && c_ != null) { + new CtuluTaskOperationGUI(this, TrResource.getS("Enregistrement Sous")) { + + public void act() { + //c_.save(TrPostCommonImplementation.this, createProgressionInterface(this)); + + //-- enregistrement sauce widget --// + c_.getManager().saveProject(true); + + } + }.start(); + } + // else if (getImportResultsAct().equals(com) && c_ != null) { // c_.importerVars(); // } @@ -202,7 +215,35 @@ public String getHelpDir() { return getInformationsSoftware().man + "post/"; } + + /** + * Methode appelee pour creer un projet .POST + * @param _f + */ + public void cmdOuvrirLayoutFile(final File _f) { + if(c_==null){ + //setProjet(new TrPostProjet(TrPostCommonImplementation.this)); + c_ = new TrPostProjet(TrPostCommonImplementation.this); + c_.active(TrPostCommonImplementation.this); + BuLib.invokeNowOrLater(new Runnable() { + public void run() { + setEnabledForAction("ENREGISTRER", true); + setEnabledForAction("ENREGISTRERSOUS", true); + setEnabledForAction("IMPORTER", true); + setEnabledForAction(getImportResultsAct(), true); + setEnabledForAction("IMPORT_PROJECT", true); + } + }); + } + BuLib.invokeLater(new Runnable() { + public void run() { + c_.getManager().loadProject(true,_f); + } + }); + + } + public void cmdOuvrirFile(final File _f) { final TrPostCommonImplementation alreadyOpen = getLauncher().findPostWithOpenedFile(_f); if (alreadyOpen == null) { @@ -213,4 +254,6 @@ } } + + } \ No newline at end of file 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -54,8 +54,10 @@ public class TrPostCourbeTreeModel extends EGGrapheTreeModel implements TrPostTimeContentListener, Target { - final FudaaCommonImplementation impl_; + +final FudaaCommonImplementation impl_; + Set intepolPt_; private final boolean isAllTimeStep_; @@ -895,5 +897,17 @@ return duplic; } + + @Override + public Object getSpecificPersitDatas() { + // TODO Auto-generated method stub + return "JE suis une courbe de profile temporel de la mort"; + } + @Override + public void setSpecificPersitDatas(Object sepcPersitData) { + // TODO Auto-generated method stub + super.setSpecificPersitDatas(sepcPersitData); + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationPanel.java 2008-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationPanel.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -583,8 +583,8 @@ JDialog dial = CtuluLibSwing.createDialogOnActiveWindow(TrLib.getString("G\xE9rer les variables")); dial.setContentPane(pn); JMenu tb = new JMenu(TrLib.getString("Edition")); - tb.add(new CtuluCommandAction.Undo(cmd)); - tb.add(new CtuluCommandAction.Redo(cmd)); +// tb.add(new CtuluCommandAction.Undo(cmd)); +// tb.add(new CtuluCommandAction.Redo(cmd)); JMenuBar bar = new JMenuBar(); bar.add(tb); dial.setJMenuBar(bar); @@ -594,6 +594,7 @@ } }; BuLib.invokeNow(r); + } 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-10-14 15:02:06 UTC (rev 4057) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-10-14 15:20:01 UTC (rev 4058) @@ -95,1238 +95,1235 @@ */ private TrPostPersistenceManager manager_; - + public TrPostPersistenceManager getManager(){ if(manager_==null) - manager_=new TrPostPersistenceManager(this); - + manager_=new TrPostPersistenceManager(this); + return manager_; } - - private class TimeContentUpdater implements ListDataListener { - protected TimeContentUpdater() { + private class TimeContentUpdater implements ListDataListener { - } + 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(); - } + } - public void contentsChanged(final ListDataEvent _event) { - updateAll(); - } + 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 intervalAdded(final ListDataEvent _event) { - updateAll(); - } + public void contentsChanged(final ListDataEvent _event) { + updateAll(); + } - public void intervalRemoved(final ListDataEvent _event) { - updateAll(); - } - } + public void intervalAdded(final ListDataEvent _event) { + updateAll(); + } - class ModifyObserver implements Observer { + public void intervalRemoved(final ListDataEvent _event) { + updateAll(); + } + } - private boolean isModified_; + class ModifyObserver implements Observer { - protected void clearModified() { - isModified_ = false; - updateFrameState(); - } + private boolean isModified_; - protected void updateFrameState() { - if (impl_ != null) { - impl_.setEnabledForAction("ENREGISTRER", isModified_); - changedMainFrameState(); - } - } + protected void clearModified() { + isModified_ = false; + updateFrameState(); + } - public boolean isModified() { - return isModified_; - } + protected void updateFrameState() { + if (impl_ != null) { + impl_.setEnabledForAction("ENREGISTRER", isModified_); + impl_.setEnabledForAction("ENREGISTRERSOUS", isModified_); + changedMainFrameState(); + } + } - public void setModified() { - isModified_ = true; - updateFrameState(); - } + public boolean isModified() { + return isModified_; + } - public void update(final Observable _o, final Object _arg) { - setModified(); - } + public void setModified() { + isModified_ = true; + updateFrameState(); + } - } + public void update(final Observable _o, final Object _arg) { + setModified(); + } - 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(); - } + class VariableListener implements TrPostDataListener { - 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 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 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 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(); + } - // 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; + // 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>(); - // /** - // *ajout une fillelayout a la liste des frame layout - // * - // * @param _fille - // */ - // public void addFillesLayout(TrPostLayoutFille _fille) { - // listeFillesLayout.add(_fille); - // } + /** + * 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; - // /** - // * 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); - // } + // /** + // *ajout une fillelayout a la liste des frame layout + // * + // * @param _fille + // */ + // public void addFillesLayout(TrPostLayoutFille _fille) { + // listeFillesLayout.add(_fille); + // } - /** - * internalframe qui gere les multiProjets - */ - public TrPostProjetsManagerFille filleProjetctManager_; + // /** + // * 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); + // } - /** - * 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_; + /** + * internalframe qui gere les multiProjets + */ + public TrPostProjetsManagerFille filleProjetctManager_; - List<ArrayList<BuMenuItem>> listeSousMenuProjets_; + /** + * 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_; - /** - * 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(); - } + List<ArrayList<BuMenuItem>> listeSousMenuProjets_; - @Override - public void notifyObservers(final Object arg) { - this.setChanged(); - super.notifyObservers(arg); - } + /** + * 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); + } - - private observableSupport observable; + } - public observableSupport getObservable() { - if (observable == null) observable = new observableSupport(); - return observable; - } - public void notifyObservers() { - // getObservable().setChanged(); + private observableSupport observable; - getObservable().notifyObservers(); + public observableSupport getObservable() { + if (observable == null) observable = new observableSupport(); + return observable; + } - } + public void notifyObservers() { + // getObservable().setChanged(); - transient int idxFilleG_; + getObservable().notifyObservers(); - public transient TrPostCommonImplementation impl_; + } - ModifyObserver modifyState_ = new ModifyObserver(); + transient int idxFilleG_; - /** - * Donnees courantes du trpost. - */ - // transient TrPostSource src_; - /** - * liste des sources pour le multiProjet. - */ - public transient ArrayList<TrPostSource> listeSrc_ = new ArrayList<TrPostSource>(); + public transient TrPostCommonImplementation impl_; - transient TimeContentUpdater timeUpdater_; + ModifyObserver modifyState_ = new ModifyObserver(); - public TrPostProjet(final TrPostCommonImplementation _impl) { - this(null, _impl); + /** + * Donnees courantes du trpost. + */ + // transient TrPostSource src_; + /** + * liste des sources pour le multiProjet. + */ + public transient ArrayList<TrPostSource> listeSrc_ = new ArrayList<TrPostSource>(); - } + transient TimeContentUpdater timeUpdater_; - public TrPostProjet(final TrPostSource _src, final TrPostCommonImplementation _impl) { - if (_src != null) - ajouterSource(_src); + public TrPostProjet(final TrPostCommonImplementation _impl) { + this(null, _impl); - // -- creation de la frame de gestion multi projet --// - filleProjetctManager_ = new TrPostProjetsManagerFille(this); - impl_ = _impl; + } - } + public TrPostProjet(final TrPostSource _src, final TrPostCommonImplementation _impl) { + if (_src != null) + ajouterSource(_src); - /** - * 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); + // -- creation de la frame de gestion multi projet --// + filleProjetctManager_ = new TrPostProjetsManagerFille(this); + impl_ = _impl; - // -- 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(); + /** + * 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); - } + // -- 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(); + } - /** - * 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; - } - return null; - } + /** + * 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) { - /** - * 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; - } + for (final Iterator<TrPostSource> it = listeSrc_.iterator(); it.hasNext();) { + final TrPostSource src = it.next(); + if (src.getFile().getAbsolutePath().equals(_file)) return src; + } - // /** - // * 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; - // } + return null; + } - /** - * 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) { + /** + * 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; + } - if (isSourceLoaded(src.getFile().getAbsolutePath())) { - listeSrc_.remove(src); + // /** + // * 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; + // } - // --recuperation du menu simul --// - final BuMenu menuSimul = getlisteMenuProjets_().get(n); + /** + * 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) { - // --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); - // } + if (isSourceLoaded(src.getFile().getAbsolutePath())) { + listeSrc_.remove(src); - // -- on retire le menuSimul de la liste --// - menuPost_.remove(menuSimul); + // --recuperation du menu simul --// + final BuMenu menuSimul = getlisteMenuProjets_().get(n); - // -- on retire de la liste des menus le menusimul et la liste des sous - // menus --// - getlisteMenuProjets_().remove(n); - getlisteSousMenuProjets_().remove(n); + // --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); + // } - // -- mise a jour de la barre des menus --// - impl_.getMainMenuBar().revalidate(); + // -- on retire le menuSimul de la liste --// + menuPost_.remove(menuSimul); - return true; - } else { - // -- messqg... [truncated message content] |
From: <emm...@us...> - 2008-10-14 15:02:17
|
Revision: 4057 http://fudaa.svn.sourceforge.net/fudaa/?rev=4057&view=rev Author: emmanuel_martin Date: 2008-10-14 15:02:06 +0000 (Tue, 14 Oct 2008) Log Message: ----------- R?\195?\169impl?\195?\169mentation (pas totalement termin?\195?\169e) de la partie conversion du wizard d'import du modeleur. Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollection.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlEditionManager.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImport.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/FSigExportImportAttributesMapper.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderSinusX.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardFileModel.java Added Paths: ----------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolygoneToMultiPoint.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToMultiPoint.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToPolygone.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelSelectionAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gui/CtuluTableCellEditorProxy.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueSelectorVisitor.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java 2008-10-13 17:18:22 UTC (rev 4056) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributAdapter.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -17,9 +17,9 @@ import com.vividsolutions.jts.geom.Geometry; /** - * Cet Adapter permet d'ajouter d'attributs globaux au DataModel. + * Cet Adapter permet l'ajout d'attributs au DataModel. * @author Emmanuel MARTIN - * @version $Id:$ + * @version $Id$ */ public class GISDataModelAttributAdapter implements GISDataModel{ @@ -209,11 +209,12 @@ * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) */ public Object getValue(int att, int geom) { - if(att<0||geom<0) return null; - if (dataModel_.getNbAttributes() > att && geom < dataModel_.getNumGeometries()) + if (att<0||geom<0) + return null; + if (dataModel_.getNbAttributes()>att&&geom<dataModel_.getNumGeometries()) return dataModel_.getValue(att, geom); - else if(newAttr_.size() > att - dataModel_.getNbAttributes() && geom < dataModel_.getNumGeometries()) - return newValues_.get(att - dataModel_.getNbAttributes())[geom]; + else if (newAttr_.size()>att-dataModel_.getNbAttributes()&&geom<dataModel_.getNumGeometries()) + return newValues_.get(att-dataModel_.getNbAttributes())[geom]; return null; } Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,196 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.HashMap; +import java.util.Map; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Cette adapter permet de substituer des attributs existant par d'autre. + * Par exemple, me model poss\xE8de deux attributs : V1 (type double) et Z + * (type double), l'adapter permet de substituer V& \xE0 Z. Ainsi toutes les + * requ\xEAtes sur Z seront redirig\xE9es sur V1. + * Les deux attributs doivent pr\xE9alablement exist\xE9s, avoir des types de valeur + * identique et \xEAtre de m\xEAme niveau (global ou atomique). + * A not\xE9 que se ne sont que les valeurs qui sont substituer. En cas d'appelle + * \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont GISAttributInterface + * sera toujours renvoy\xE9 comme avant. + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class GISDataModelAttributSubstitution implements GISDataModel { + + private final GISDataModel model_; + /** + * Table contenant les substitutions d'attributs \xE0 faire sur le model. + * Pour des raisons de performence, la substitution est m\xE9moris\xE9 par + * l'index des attributs. + */ + private final HashMap<Integer, Integer> substitutionTable_; + + /** + * Cette adapter permet de substituer des attributs existant par d'autre. Par + * exemple, me model poss\xE8de deux attributs : V1 (type double) et Z (type + * double), l'adapter permet de substituer V1 \xE0 Z. Ainsi toutes les requ\xEAtes + * sur Z seront redirig\xE9es sur V1. Les deux attributs doivent pr\xE9alablement + * exist\xE9s et avoir des types de valeur identique. Si les attributs sont de + * niveau (global ou atomique) diff\xE9rent, l'adapter converti les valeurs + * en utilisant la m\xE9thod createDataForGeom. + * A not\xE9 que se ne sont que les valeurs qui sont substituer. En + * cas d'appelle \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont + * GISAttributInterface sera toujours renvoy\xE9 comme avant. + * + * + * @param _model + * le model \xE0 adaoter + * @param _substitutionTable + * cette table contient les substitutions \xE0 faire. Une substitution + * est un tableau \xE0 deux \xE9l\xE9ments : le premier l'attribut a + * substituer et le second l'attribut par lequel le substituer. + * _substitutionTable est donc un tableau de tableau \xE0 deux \xE9l\xE9ments. + */ + public GISDataModelAttributSubstitution(GISDataModel _model, GISAttributeInterface[][] _substitutionTable){ + if(_substitutionTable==null||_model==null) + throw new IllegalArgumentException("_substitutionTable et _model ne doivent pas \xEAtre null."); + model_=_model; + substitutionTable_=new HashMap<Integer, Integer>(); + // Verification des substitutions + for(int i=0;i<_substitutionTable.length;i++){ + if(_substitutionTable[i].length!=2) + throw new IllegalArgumentException("Une substitution est un tableau \xE0 deux \xE9l\xE9ments, ni plus, ni moins."); + if(_substitutionTable[i][0].getDataClass()!=_substitutionTable[i][1].getDataClass()) + throw new IllegalArgumentException("Les deux substitutions doivent avoir des valeurs de m\xEAme type."); + if(model_.getIndiceOf(_substitutionTable[i][0])==-1) + throw new IllegalArgumentException(_substitutionTable[i][0].getID() + "n'est pas dans le model."); + if(model_.getIndiceOf(_substitutionTable[i][1])==-1) + throw new IllegalArgumentException(_substitutionTable[i][1].getID() + "n'est pas dans le model."); + // Ajout de la substitution + substitutionTable_.put(model_.getIndiceOf(_substitutionTable[i][0]), model_.getIndiceOf(_substitutionTable[i][1])); + } + } + + /** + * Cette adapter permet de substituer des attributs existant par d'autre. Par + * exemple, me model poss\xE8de deux attributs : V1 (type double) et Z (type + * double), l'adapter permet de substituer V& \xE0 Z. Ainsi toutes les requ\xEAtes + * sur Z seront redirig\xE9es sur V1. Les deux attributs doivent pr\xE9alablement + * exist\xE9s, avoir des types de valeur identique et \xEAtre de m\xEAme niveau (global + * ou atomique). + * A not\xE9 que se ne sont que les valeurs qui sont substituer. En + * cas d'appelle \xE0 la m\xE9thod getAttribut sur l'attribut substituer, sont + * GISAttributInterface sera toujours renvoy\xE9 comme avant. + * + * + * @param _model + * le model \xE0 adaoter + * @param _substitutionTable + * cette map contient les substitutions \xE0 faire. Le premier l'attribut + * a substituer et le second l'attribut par lequel le substituer. + */ + public GISDataModelAttributSubstitution(GISDataModel _model, Map<GISAttributeInterface, GISAttributeInterface> _substitutionTable){ + if(_substitutionTable==null||_model==null) + throw new IllegalArgumentException("_substitutionTable et _model ne doivent pas \xEAtre null."); + model_=_model; + substitutionTable_=new HashMap<Integer, Integer>(); + // Verification des substitutions + for(Map.Entry<GISAttributeInterface, GISAttributeInterface> entry:_substitutionTable.entrySet()){ + if(entry.getKey().getDataClass()!=entry.getValue().getDataClass()) + throw new IllegalArgumentException("Les deux substitutions doivent avoir des valeurs de m\xEAme type."); + if(model_.getIndiceOf(entry.getKey())==-1) + throw new IllegalArgumentException(entry.getKey().getID() + "n'est pas dans le model."); + if(model_.getIndiceOf(entry.getValue())==-1) + throw new IllegalArgumentException(entry.getValue().getID() + "n'est pas dans le model."); + // Ajout de la substitution + substitutionTable_.put(model_.getIndiceOf(entry.getKey()), model_.getIndiceOf(entry.getValue())); + } + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if (substitutionTable_.containsKey(_att)) + return model_.getDoubleValue(substitutionTable_.get(_att), _geom); + else + return model_.getDoubleValue(_att, _geom); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + return model_.getGeometry(_geom); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return model_.getNumGeometries(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if (substitutionTable_.containsKey(_att)) + if (getAttribute(_att).isAtomicValue()!=getAttribute(substitutionTable_.get(_att)).isAtomicValue()) { + Object value; + if (getAttribute(substitutionTable_.get(_att)).isAtomicValue()) + value=((GISAttributeModel)model_.getValue(substitutionTable_.get(_att), _geom)).getAverage(); + else + value=model_.getValue(substitutionTable_.get(_att), _geom); + return model_.getAttribute(_att).createDataForGeom(value, model_.getGeometry(_geom).getNumPoints()); + } + else + return model_.getValue(substitutionTable_.get(_att), _geom); + else + return model_.getValue(_att, _geom); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } + +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAttributSubstitution.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,125 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.LinearRing; +import com.vividsolutions.jts.geom.MultiPoint; + +/** + * Cette classe convertie les mulitpoints en polyligne. Les g\xE9om\xE9tries faisant + * partie du model ne pouvant \xEAtre converties (soit parce que se ne sont pas des + * multipoint soit parce qu'il n'y a pas assez de points pour faire la conversion) + * deviennent invisible. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class GISDataModelMultiPointToPolyligne implements GISDataModel { + + private final GISDataModel model_; + /** Table de translation d'indices des g\xE9om\xE9tries. */ + private final ArrayList<Integer> translationTable_; + /** Table cache des polylignes cr\xE9es.*/ + private final HashMap<Integer, LineString> cachePolyligne_; + + public GISDataModelMultiPointToPolyligne(GISDataModel _model){ + if(_model==null) + throw new IllegalArgumentException("_model ne doit pas \xEAtre null."); + translationTable_=new ArrayList<Integer>(); + cachePolyligne_=new HashMap<Integer, LineString>(); + model_=_model; + // Construction de la table de translation + for(int i=0;i<model_.getNumGeometries();i++) + if(model_.getGeometry(i) instanceof MultiPoint && model_.getGeometry(i).getNumPoints() >= 2) + translationTable_.add(i); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return getDoubleValue(_att, translationTable_.get(_geom)); + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + if (_geom>=0&&_geom<translationTable_.size()) { + if (!cachePolyligne_.containsKey(_geom)) { + Coordinate[] coordinates=model_.getGeometry(translationTable_.get(_geom)).getCoordinates(); + // Cr\xE9ation de la polyligne + cachePolyligne_.put(_geom, GISGeometryFactory.INSTANCE.createLineString(coordinates)); + } + return cachePolyligne_.get(_geom); + } + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return translationTable_.size(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return model_.getValue(_att, translationTable_.get(_geom)); + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelMultiPointToPolyligne.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolygoneToMultiPoint.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolygoneToMultiPoint.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolygoneToMultiPoint.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,124 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.LinearRing; +import com.vividsolutions.jts.geom.MultiPoint; +import com.vividsolutions.jts.geom.Point; + +/** + * Cette classe convertie les polygones en Multipoint. Les g\xE9om\xE9tries faisant + * partie du model ne pouvant \xEAtre converties (parce que se ne sont pas des + * polygones) deviennent invisible. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class GISDataModelPolygoneToMultiPoint implements GISDataModel { + + private final GISDataModel model_; + /** Table de translation d'indices des g\xE9om\xE9tries. */ + private final ArrayList<Integer> translationTable_; + /** Table cache des multipoints cr\xE9es.*/ + private final HashMap<Integer, MultiPoint> cacheMultiPoint_; + + public GISDataModelPolygoneToMultiPoint(GISDataModel _model){ + if(_model==null) + throw new IllegalArgumentException("_model ne doit pas \xEAtre null."); + translationTable_=new ArrayList<Integer>(); + cacheMultiPoint_=new HashMap<Integer, MultiPoint>(); + model_=_model; + // Construction de la table de translation + for(int i=0;i<model_.getNumGeometries();i++) + if(model_.getGeometry(i) instanceof LinearRing) + translationTable_.add(i); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return getDoubleValue(_att, translationTable_.get(_geom)); + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + if (_geom>=0&&_geom<translationTable_.size()) { + if (!cacheMultiPoint_.containsKey(_geom)) { + Coordinate[] coordinates=model_.getGeometry(translationTable_.get(_geom)).getCoordinates(); + // Cr\xE9ation du MultiPoint + cacheMultiPoint_.put(_geom, GISGeometryFactory.INSTANCE.createMultiPoint(coordinates)); + } + return cacheMultiPoint_.get(_geom); + } + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return translationTable_.size(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return model_.getValue(_att, translationTable_.get(_geom)); + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolygoneToMultiPoint.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToMultiPoint.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToMultiPoint.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToMultiPoint.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,123 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.MultiPoint; + +/** + * Cette classe convertie les polylignes en Multipoint. Les g\xE9om\xE9tries faisant + * partie du model ne pouvant \xEAtre converties (parce que se ne sont pas des + * polylignes) deviennent invisible. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class GISDataModelPolyligneToMultiPoint implements GISDataModel { + + private final GISDataModel model_; + /** Table de translation d'indices des g\xE9om\xE9tries. */ + private final ArrayList<Integer> translationTable_; + /** Table cache des multipoints cr\xE9es.*/ + private final HashMap<Integer, MultiPoint> cacheMultiPoint_; + + public GISDataModelPolyligneToMultiPoint(GISDataModel _model){ + if(_model==null) + throw new IllegalArgumentException("_model ne doit pas \xEAtre null."); + translationTable_=new ArrayList<Integer>(); + cacheMultiPoint_=new HashMap<Integer, MultiPoint>(); + model_=_model; + // Construction de la table de translation + for(int i=0;i<model_.getNumGeometries();i++) + if(model_.getGeometry(i) instanceof LineString) + translationTable_.add(i); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return getDoubleValue(_att, translationTable_.get(_geom)); + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + if (_geom>=0&&_geom<translationTable_.size()) { + if (!cacheMultiPoint_.containsKey(_geom)) { + Coordinate[] coordinates=model_.getGeometry(translationTable_.get(_geom)).getCoordinates(); + // Cr\xE9ation du MultiPoint + cacheMultiPoint_.put(_geom, GISGeometryFactory.INSTANCE.createMultiPoint(coordinates)); + } + return cacheMultiPoint_.get(_geom); + } + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return translationTable_.size(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return model_.getValue(_att, translationTable_.get(_geom)); + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToMultiPoint.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToPolygone.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToPolygone.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToPolygone.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,132 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.LinearRing; + +/** + * Cette classe convertie les polylignes en polygone. Les g\xE9om\xE9tries faisant + * partie du model ne pouvant \xEAtre converties (soit parce que se ne sont pas des + * polylignes soit parce qu'il n'y a pas assez de point dans la polyligne) + * deviennent invisible. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class GISDataModelPolyligneToPolygone implements GISDataModel { + + private final GISDataModel model_; + /** Table de translation d'indices des g\xE9om\xE9tries. */ + private final ArrayList<Integer> translationTable_; + /** Table cache des polygone cr\xE9es.*/ + private final HashMap<Integer, LinearRing> cachePolygone_; + + public GISDataModelPolyligneToPolygone(GISDataModel _model){ + if(_model==null) + throw new IllegalArgumentException("_model ne doit pas \xEAtre null."); + translationTable_=new ArrayList<Integer>(); + cachePolygone_=new HashMap<Integer, LinearRing>(); + model_=_model; + // Construction de la table de translation + for(int i=0;i<model_.getNumGeometries();i++) + if(model_.getGeometry(i) instanceof LineString && model_.getGeometry(i).getNumPoints() >= 3) + translationTable_.add(i); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return getDoubleValue(_att, translationTable_.get(_geom)); + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + if (_geom>=0&&_geom<translationTable_.size()) { + if (!cachePolygone_.containsKey(_geom)) { + Coordinate[] coordinates=model_.getGeometry(translationTable_.get(_geom)).getCoordinates(); + // Le premier point et le dernier point doivent \xEAtre les m\xEAmes pour le + // polygone + if (coordinates[0]!=coordinates[coordinates.length-1]) { + Coordinate[] newCoordinates=new Coordinate[coordinates.length+1]; + System.arraycopy(coordinates, 0, newCoordinates, 0, coordinates.length); + newCoordinates[newCoordinates.length-1]=newCoordinates[0]; + coordinates=newCoordinates; + } + // Cr\xE9ation du polygone + cachePolygone_.put(_geom, GISGeometryFactory.INSTANCE.createLinearRing(coordinates)); + } + return cachePolygone_.get(_geom); + } + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return translationTable_.size(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return model_.getValue(_att, translationTable_.get(_geom)); + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPolyligneToPolygone.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelSelectionAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelSelectionAdapter.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelSelectionAdapter.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,160 @@ +/* + * @creation 14 oct. 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.ctulu.gis; + +import java.util.ArrayList; + +import org.fudaa.ctulu.ProgressionInterface; + +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Cette adapter permet de ne faire apparaitre dans le model que les g\xE9om\xE9tries + * r\xE9pondant \xE0 des conditions donn\xE9es sur les attributs. Par exemple on peut + * dire que seul les g\xE9om\xE9tries d'une certaine nature sont visbles. + * Plusieurs conditions peuvent \xEAtre donn\xE9es. Elles seront g\xE9r\xE9es avec un OU + * logique. Pour simuler un ET logique entre des conditions, il suffi d'empiler + * plusieurs fois cette adapter sur le model. + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class GISDataModelSelectionAdapter implements GISDataModel { + + public static final String ATTRIBUT_EXIST = "< GISDataModelSelectionAdapter:ATTRIBUT_EXIST >"; + public static final String ATTRIBUT_NOT_EXIST = "< GISDataModelSelectionAdapter:ATTRIBUT_NOT_EXIST >"; + + private final GISDataModel model_; + private final Object[][] conditions_; + /** Table de translation d'indices des g\xE9om\xE9tries. */ + private final ArrayList<Integer> translationTable_; + + /** + * Cette adapter permet de ne faire apparaitre dans le model que les + * g\xE9om\xE9tries r\xE9pondant \xE0 des conditions donn\xE9es sur les attributs.Par + * exemple on peut dire que seul les g\xE9om\xE9tries d'une certaine nature sont + * visbles. Plusieurs conditions peuvent \xEAtre donn\xE9es. Elles seront g\xE9r\xE9es + * avec un OU logique. Pour simuler un ET logique entre des conditions, il + * suffi d'empiler plusieurs fois cette adapter sur le model. + * + * @param _model + * le model sur lequel va se faire la selection + * @param _conditions + * un tableau de conditions. Une condition \xE9tant d\xE9finie par deux + * \xE9l\xE9ments : l'attribut concern\xE9 (GISAttributeInterface) et sa + * valeur (Object). Deux valeurs sp\xE9cials sont d\xE9finies dans cette + * classe : ATTRIBUT_EXIST pour indiquer que la condition est vrai a + * partir du moment o\xF9 l'attribut est d\xE9finie ; ATTRIBUT_NOT_EXIST + * indique que la condition est vrai a partir du moment o\xF9 l'attribut + * n'existe pas. + */ + public GISDataModelSelectionAdapter(GISDataModel _model, Object[][] _conditions){ + if(_model==null||_conditions==null) + throw new IllegalArgumentException("_model et _conditions ne doivent pas \xEAtre null."); + translationTable_=new ArrayList<Integer>(); + model_=_model; + // Verification de la validit\xE9 des conditions + for(int i=0;i<_conditions.length;i++){ + if(_conditions[i].length!=2) + throw new IllegalArgumentException("La taille de chaque condition doit \xEAtre \xE9gale \xE0 deux."); + if(!(_conditions[i][0] instanceof GISAttributeInterface)) + throw new IllegalArgumentException("Le premier \xE9l\xE9ment de la condition doit \xEAtre un GISAttributeInterface"); + } + conditions_=_conditions; + // R\xE9cup\xE9ration des indices des attribtus concernant les conditions + int[] indexAttributsConditions = new int[conditions_.length]; + for(int i=0;i<indexAttributsConditions.length;i++) + indexAttributsConditions[i]=model_.getIndiceOf((GISAttributeInterface)conditions_[i][0]); + // G\xE9n\xE9ration d'une table de translation d'index des g\xE9om\xE9tries + for(int i=0;i<model_.getNumGeometries();i++){ + // Verification des conditions + boolean valide=false; + int j=-1; + while(!valide&&++j<conditions_.length){ + if(indexAttributsConditions[j]==-1&&conditions_[j][1]==ATTRIBUT_NOT_EXIST) + valide=true; + else if(indexAttributsConditions[j]!=-1&&conditions_[j][1]==ATTRIBUT_EXIST) + valide=true; + else if(indexAttributsConditions[j]!=-1&&conditions_[j][1]==model_.getValue(indexAttributsConditions[j], i)) + valide=true; + } + if(valide) + translationTable_.add(i); + } + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getAttribute(int) + */ + public GISAttributeInterface getAttribute(int _att) { + return model_.getAttribute(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getDoubleValue(int, int) + */ + public double getDoubleValue(int _att, int _geom) { + if(_geom>0&&_geom<translationTable_.size()) + return model_.getDoubleValue(_att, translationTable_.get(_geom)); + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getEnvelopeInternal() + */ + public Envelope getEnvelopeInternal() { + return model_.getEnvelopeInternal(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getGeometry(int) + */ + public Geometry getGeometry(int _geom) { + if(_geom<0||_geom>=translationTable_.size()) + return null; + return model_.getGeometry(translationTable_.get(_geom)); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getIndiceOf(org.fudaa.ctulu.gis.GISAttributeInterface) + */ + public int getIndiceOf(GISAttributeInterface _att) { + return model_.getIndiceOf(_att); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNbAttributes() + */ + public int getNbAttributes() { + return model_.getNbAttributes(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getNumGeometries() + */ + public int getNumGeometries() { + return translationTable_.size(); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#getValue(int, int) + */ + public Object getValue(int _att, int _geom) { + if(_geom>=0&&_geom<translationTable_.size()) + return model_.getValue(_att, translationTable_.get(_geom)); + return null; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gis.GISDataModel#preload(org.fudaa.ctulu.gis.GISAttributeInterface[], org.fudaa.ctulu.ProgressionInterface) + */ + public void preload(GISAttributeInterface[] _att, ProgressionInterface _prog) { + model_.preload(_att, _prog); + } + +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISDataModelSelectionAdapter.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollection.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollection.java 2008-10-13 17:18:22 UTC (rev 4056) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollection.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -559,6 +559,19 @@ else fixedAttributes_.put(_att, _value); } + + /** + * Retourne la valeur associ\xE9e \xE0 un attribut immuable via la m\xE9thode + * setFixedAttributeValue. + * + * @param _att : l'attribut recherch\xE9 + * @return la valeur de l'attribut. Null si l'attribut n'est pas renseign\xE9. + */ + public Object getFixedAttributValue(GISAttributeInterface _att) { + if(_att!=null && fixedAttributes_.containsKey(_att)) + return fixedAttributes_.get(_att); + return null; + } /** * Associe les attributs aux objets de la collection. Pour chaque attribut inexistant dans la liste est cr\xE9\xE9 un nouveau mod\xE8le. Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gui/CtuluTableCellEditorProxy.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gui/CtuluTableCellEditorProxy.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gui/CtuluTableCellEditorProxy.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,187 @@ +/* + * @creation 10 oct. 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.ctulu.gui; + +import java.awt.Component; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Map; + +import javax.swing.AbstractCellEditor; +import javax.swing.JTable; +import javax.swing.event.CellEditorListener; +import javax.swing.event.ChangeEvent; +import javax.swing.table.TableCellEditor; + +/** + * Cette classe est un proxy qui permet de choisir un \xE9ditor diff\xE9rent par + * ligne. Il est possible de donner les editeurs soit via un table soit via une + * map. + * + * tableau : le tableau doit avoir le m\xEAme nombre de case que le nombre de ligne + * dans le tableau \xE0 \xE9diter. Si se n'est pas le cas, les cellules + * suppl\xE9mentaires seront consid\xE9r\xE9es comme non \xE9ditable. Il est possible que + * donner des valeurs null dans le tableau, il sera alors consid\xE9r\xE9 que la + * cellule n'est pas \xE9ditable. + * + * map : l'avantage de la map par rapport au tableau est de ne renseigner que + * les lignes voulus. Il est possible de donner un index par defaut. Cette index + * servira \xE0 retourner l'editeur par defaut si il n'y en a pas de d\xE9fini \xE0 + * l'index demand\xE9. Si aucune instance n'est renseign\xE9 pour l'index par defaut, + * les cases seront consid\xE9r\xE9es comme non \xE9ditable. Comme le tableau, la valeur + * null pour un \xE9diteur signifie que la cellule n'est pas \xE9ditable. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class CtuluTableCellEditorProxy extends AbstractCellEditor implements TableCellEditor, CellEditorListener { + + /** Le container d'editor, la clef est la ligne et la valeur le TableCellEditor.*/ + private final Map<Integer, TableCellEditor> mapEditors_; + /** Index par defaut en cas d'absence de la ligne dans la map. */ + private final int defaultIndex_; + /** L'index utilis\xE9 actuellement. */ + private int currentIndex_; + + /** + * Si le tableau n'est pas assez grand, null sera retourn\xE9 par la method + * getTableCellEditorComponent. + * + * Si _editors est null IllegalArgumentException sera lev\xE9e. + * + * @param _editors + * Tableau contenant l'editeur pour chaque ligne. Une valeur null + * pour un editeur undique que la cellule n'est pas \xE9ditable, null + * sera renvoy\xE9 par getTableCellEditorComponent. + */ + public CtuluTableCellEditorProxy(TableCellEditor[] _editors) { + if (_editors==null) + throw new IllegalArgumentException("_editors de doit pas \xEAtre null."); + mapEditors_=new HashMap<Integer, TableCellEditor>(); + defaultIndex_=-1; + currentIndex_=-1; + for (int i=0; i<_editors.length; i++) + mapEditors_.put(i, _editors[i]); + } + + /** + * Si _editors est null IllegalArgumentException sera lev\xE9e. + * + * @param _editors + * Une Map avec pour key le num\xE9ro de la ligne et pour Value un + * TableCellEditor. Une valeur null pour un editeur indique que la + * cellule n'est pas \xE9ditable : null sera renvoy\xE9 par + * getTableCellEditorComponent. + * @param _defaultChoice + * Si des lignes ne sont pas renseign\xE9s, la Key _defaultChoice sera + * utilis\xE9e \xE0 la place. Si la valeur par defaut n'est pas dans la map, + * null sera renvoy\xE9 par getTableCellEditor. + */ + public CtuluTableCellEditorProxy(Map<Integer, TableCellEditor> _editors, int _defaultChoice) { + if (_editors==null) + throw new IllegalArgumentException("_editors de doit pas \xEAtre null."); + defaultIndex_=_defaultChoice; + currentIndex_=-1; + mapEditors_=_editors; + } + + /* (non-Javadoc) + * @see javax.swing.table.TableCellEditor#getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int) + */ + public Component getTableCellEditorComponent(JTable _table, Object _value, boolean _isSelected, int _row, int _column) { + // Suppression de l'\xE9coute d'\xE9venement sur l'ancien editeur + if(currentIndex_!=-1) + mapEditors_.get(currentIndex_).removeCellEditorListener(this); + // Actualisation de currentIndex_ + if(mapEditors_.containsKey(_row)) + if(mapEditors_.get(_row)!=null) + // Cas normal + currentIndex_=_row; + else{ + // Cas o\xF9 la cellule n'est pas \xE9ditable + currentIndex_=-1; + return null; + } + else if(mapEditors_.containsKey(defaultIndex_)) + // Cas o\xF9 l'editeur n'est pas renseign\xE9 : on utilise la valeur par defaut + if(mapEditors_.get(defaultIndex_)!=null) + // Cas normal de l'utilisation de l'editeur par defaut + currentIndex_=defaultIndex_; + else{ + // Cas o\xF9 l'index par defaut pointe sur null + currentIndex_=-1; + return null; + } + else{ + // Cas o\xF9 la valeur par defaut n'existe pas : la case est non \xE9ditable + currentIndex_=-1; + return null; + } + // Ajout de l'\xE9coute d'\xE9venement sur le nouvel \xE9diteur et transfert d'appelle + mapEditors_.get(currentIndex_).addCellEditorListener(this); + return mapEditors_.get(currentIndex_).getTableCellEditorComponent(_table, _value, _isSelected, _row, _column); + } + + /* (non-Javadoc) + * @see javax.swing.CellEditor#cancelCellEditing() + */ + public void cancelCellEditing() { + if(currentIndex_!=-1) + mapEditors_.get(currentIndex_).cancelCellEditing(); + } + + /* (non-Javadoc) + * @see javax.swing.CellEditor#getCellEditorValue() + */ + public Object getCellEditorValue() { + if(currentIndex_!=-1) + return mapEditors_.get(currentIndex_).getCellEditorValue(); + return null; + } + + /* (non-Javadoc) + * @see javax.swing.CellEditor#isCellEditable(java.util.EventObject) + */ + public boolean isCellEditable(EventObject _anEvent) { + if(currentIndex_!=-1) + return mapEditors_.get(currentIndex_).isCellEditable(_anEvent); + return true; + } + + /* (non-Javadoc) + * @see javax.swing.CellEditor#shouldSelectCell(java.util.EventObject) + */ + public boolean shouldSelectCell(EventObject _anEvent) { + if(currentIndex_!=-1) + return mapEditors_.get(currentIndex_).shouldSelectCell(_anEvent); + return true; + } + + /* (non-Javadoc) + * @see javax.swing.CellEditor#stopCellEditing() + */ + public boolean stopCellEditing() { + if(currentIndex_!=-1) + return mapEditors_.get(currentIndex_).stopCellEditing(); + return true; + } + + /* (non-Javadoc) + * @see javax.swing.event.CellEditorListener#editingCanceled(javax.swing.event.ChangeEvent) + */ + public void editingCanceled(ChangeEvent e) { + fireEditingCanceled(); + } + + /* (non-Javadoc) + * @see javax.swing.event.CellEditorListener#editingStopped(javax.swing.event.ChangeEvent) + */ + public void editingStopped(ChangeEvent e) { + fireEditingStopped(); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ctulu/src/org/fudaa/ctulu/gui/CtuluTableCellEditorProxy.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueSelectorVisitor.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueSelectorVisitor.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueSelectorVisitor.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -0,0 +1,55 @@ +/* + * @creation 13 oct. 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.ebli.calque; + +import java.util.ArrayList; + +import org.fudaa.ebli.calque.edition.ZCalqueEditable; + +/** + * Ce visiteur parcours la hi\xE9rarchie de calque et selectionne ceux poss\xE9dant un + * model de donn\xE9es du type choisie et impl\xE9mentant ZCalqueEditable. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class CalqueSelectorVisitor implements BCalqueVisitor { + + /** Le type de model sur lequel se fait la selection des calques. */ + private Class<? extends ZModeleDonnees> typeModel_; + /** Liste contenant les calques selectionn\xE9s */ + private ArrayList<ZCalqueAffichageDonneesAbstract> selectedCalques_; + + public CalqueSelectorVisitor(Class<? extends ZModeleDonnees> _typeModel) { + typeModel_=_typeModel; + selectedCalques_=new ArrayList<ZCalqueAffichageDonneesAbstract>(); + } + + /* + * (non-Javadoc) + * + * @see + * org.fudaa.ebli.calque.BCalqueVisitor#visit(org.fudaa.ebli.calque.BCalque) + */ + public boolean visit(BCalque _cq) { + if (_cq instanceof ZCalqueAffichageDonneesAbstract && _cq instanceof ZCalqueEditable) { + ZModeleDonnees modelData=((ZCalqueAffichageDonneesAbstract)_cq).modeleDonnees(); + if (modelData!=null&&typeModel_.isInstance(modelData)) + selectedCalques_.add((ZCalqueAffichageDonneesAbstract)_cq); + } + return true; + } + + /** + * @return retourne la liste de calques selectionn\xE9s. + */ + public ZCalqueAffichageDonneesAbstract[] getSelectedCalques() { + return selectedCalques_.toArray(new ZCalqueAffichageDonneesAbstract[0]); + } + +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueSelectorVisitor.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlEditionManager.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlEditionManager.java 2008-10-13 17:18:22 UTC (rev 4056) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlEditionManager.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -96,10 +96,9 @@ return; } - final MdlWizardImport importWizard = new MdlWizardImport(dest, this, getEnglobPolygone(), ed, - ((FSigVisuPanel) getPanel()).getImpl(),((FSigVisuPanel) getPanel()).getCmdMng()); - final BuWizardDialog dialog = new BuWizardDialog(CtuluLibSwing.getFrameAncestorHelper(super.getPanel()), - importWizard); + final MdlWizardImport importWizard=new MdlWizardImport(getPanel().getDonneesCalque(), getEnglobPolygone(), ed, + ((FSigVisuPanel)getPanel()).getImpl(), ((FSigVisuPanel)getPanel()).getCmdMng()); + final BuWizardDialog dialog=new BuWizardDialog(CtuluLibSwing.getFrameAncestorHelper(super.getPanel()), importWizard); importWizard.setDialog(dialog); dialog.pack(); dialog.setModal(true); Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImport.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImport.java 2008-10-13 17:18:22 UTC (rev 4056) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImport.java 2008-10-14 15:02:06 UTC (rev 4057) @@ -7,10 +7,14 @@ */ package org.fudaa.fudaa.modeleur; +import java.awt.Component; import java.awt.Dimension; +import java.util.Arrays; import java.util.Map; +import javax.swing.DefaultListModel; import javax.swing.JComponent; +import javax.swing.JDialog; import javax.swing.event.ListDataEvent; import javax.swing.event.ListDataListener; import javax.swing.event.TableModelEvent; @@ -19,63 +23,75 @@ import org.fudaa.ctulu.CtuluAnalyze; import org.fudaa.ctulu.CtuluCommandComposite; import org.fudaa.ctulu.CtuluCommandManager; -import org.fudaa.ctulu.CtuluLib; +import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluTaskDelegate; import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ctulu.gis.GISAttributeConstants; import org.fudaa.ctulu.gis.GISAttributeInterface; +import org.fudaa.ctulu.gis.GISAttributeNameComparator; import org.fudaa.ctulu.gis.GISDataModel; +import org.fudaa.ctulu.gis.GISDataModelAttributAdapter; +import org.fudaa.ctulu.gis.GISDataModelAttributSubstitution; import org.fudaa.ctulu.gis.GISDataModelFilterAdapter; +import org.fudaa.ctulu.gis.GISDataModelMultiPointToPolyligne; import org.fudaa.ctulu.gis.GISDataModelPointMultiPointAdapter; -import org.fudaa.ctulu.gis.GISDataModelPointPolyAdapter; +import org.fudaa.ctulu.gis.GISDataModelPolygoneToMultiPoint; +import org.fudaa.ctulu.gis.GISDataModelPolyligneToMultiPoint; +import org.fudaa.ctulu.gis.GISDataModelPolyligneToPolygone; +import org.fudaa.ctulu.gis.GISDataModelSelectionAdapter; import org.fudaa.ctulu.gis.GISPolygone; -import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee; -import org.fudaa.ctulu.gis.GISZoneCollectionMultiPoint; -import org.fudaa.ctulu.gis.GISZoneCollectionPoint; +import org.fudaa.ctulu.gis.GISZoneCollection; import org.fudaa.ebli.calque.BGroupeCalque; -import org.fudaa.ebli.calque.ZCalqueAffichageDonnees; +import org.fudaa.ebli.calque.ZCalqueAffichageDonneesAbstract; +import org.fudaa.ebli.calque.ZModeleGeometry; import org.fudaa.ebli.calque.dessin.DeForme; import org.fudaa.ebli.calque.edition.ZCalqueEditable; -import org.fudaa.ebli.calque.edition.ZCalqueEditionGroup; import org.fudaa.fudaa.commun.FudaaLib; -import org.fudaa.fudaa.modeleur.layer.MdlLayer2dLine; -import org.fudaa.fudaa.modeleur.layer.MdlLayer2dMultiPoint; -import org.fudaa.fudaa.modeleur.layer.MdlLayerFactory; -import org.fudaa.fudaa.modeleur.layer.MdlLayerInterface; -import org.fudaa.fudaa.modeleur.layer.MdlModel2dLine; -import org.fudaa.fudaa.modeleur.layer.MdlModel2dMultiPoint; import org.fudaa.fudaa.sig.FSigExportImportAttributesMapper; +import org.fudaa.fudaa.sig.FSigGeomSrcData; import org.fudaa.fudaa.sig.FSigLib; -import org.fudaa.fudaa.sig.layer.FSigEditor; import org.fudaa.fudaa.sig.wizard.FSigFileLoaderPanel; -import org.fudaa.fudaa.sig.wizard.FSigWizardImport; -import org.fudaa.fudaa.sig.wizard.FSigWizardImportStepDestination; +import org.fudaa.fudaa.sig.wizard.FSigWizardImportHelper; +import com.memoire.bu.BuButtonPanel; +import com.memoire.bu.BuGlassPaneStop; +import com.memoire.bu.BuWizardTask; + /** - * Un wizard d'import de donn\xE9es dans le calque cible. Il est limit\xE9 \xE0 1 etape. + * Wizard d'import du modeleur. * @author Bertrand Marchand + * @author Emmanuel Martin * @version $Id:$ */ -public class MdlWizardImport extends FSigWizardImport { - CtuluCommandManager mng_; +public class MdlWizardImport extends BuWizardTask { + private CtuluCommandManager mng_; - private BGroupeCalque mdlDest_; - private FSigEditor mdlEditor_; + private BGroupeCalque calqueRacine_; + private MdlWizardImportStepDestination pnDest_; + protected final GISPolygone[] previewZone_; + protected final ZCalqueEditable selectedLayer_; + protected FSigGeomSrcData data_; + protected JDialog dialog_; + protected FSigFileLoaderPanel fileLoader_; + protected final CtuluUI impl_; + protected GISAttributeInterface[] src_; + protected final DefaultListModel srcAtt_ = new DefaultListModel(); - /** - * @param _previewZone - * @param _selectedLayer - * @param _impl + * @param _previewZone la zone a utiliser pour la pr\xE9visualisation + * @param _selectedLayer le calque en cours de selection: peut-etre null + * @param _impl l'impl parent */ - public MdlWizardImport(BGroupeCalque _dest, FSigEditor _editor, GISPolygone[] _previewZone, ZCalqueEditable _selectedLayer, CtuluUI _impl, CtuluCommandManager _mng) { - super(null, _previewZone, _selectedLayer, _impl); + public MdlWizardImport(BGroupeCalque _racine, GISPolygone[] _previewZone, ZCalqueEditable _selectedLayer, CtuluUI _impl, CtuluCommandManager _mng) { mng_=_mng; - mdlDest_=_dest; - mdlEditor_=_editor; + calqueRacine_=_racine; + impl_ = _impl; + previewZone_ = _previewZone; + selectedLayer_ = _selectedLayer; + // Exemple de cr\xE9ation d'un sous calque pour un BGroupeCalque /* int cqType_ = MdlLayerFactory.LAYER2D_CLOUD; @@ -86,200 +102,230 @@ } public JComponent getStepComponent() { - if (current_ == 0) { - if (fileLoader_ == null) { + if (current_==0) { + if (fileLoader_==null) { srcAtt_.addListDataListener(new ListDataListener() { - public void contentsChanged(final ListDataEvent _e) { rebuildAtt(); } - public void intervalAdded(final ListDataEvent _e) { rebuildAtt(); } - public void intervalRemoved(final ListDataEvent _e) { rebuildAtt(); } }); - fileLoader_ = new FSigFileLoaderPanel(srcAtt_, impl_, previewZone_); + fileLoader_=new FSigFileLoaderPanel(srcAtt_, impl_, previewZone_); fileLoader_.setPreferredSize(new Dimension(450, 400)); fileLoader_.setAttributeRequired(false); fileLoader_.getFileMng().getModel().addTableModelListener(new TableModelListener() { - public void tableChanged(final TableModelEvent _e) { - data_ = null; + data_=null; } }); } return fileLoader_; - } else if (current_ == 1) { - if (mapper_ == null) { - if (dest_!=null && dest_.getAttributes()!=null) - mapper_ = new FSigExportImportAttributesMapper(src_, dest_.getAttributes(), false); - } - if (pnDest_==null) pnDest_=new FSigWizardImportStepDestination(mdlDest_); - pnDest_.setMapper(mapper_); - pnDest_.setSrc(data_); - pnDest_.setSelectedLayer(selectedLayer_); - pnDest_.update(); + } + else if (current_==1) { + pnDest_=new MdlWizardImportStepDestination(calqueRacine_, data_, selectedLayer_); return pnDest_; } return null; } - public void doTask() { - CtuluAnalyze analyze=new CtuluAnalyze(); - if (data_==null) data_ = fileLoader_.loadAll(null, analyze); - // Affiche les erreurs dans une boite de dialogue. - impl_.manageAnalyzeAndIsFatal(analyze); - -... [truncated message content] |
From: <had...@us...> - 2008-10-13 17:18:26
|
Revision: 4056 http://fudaa.svn.sourceforge.net/fudaa/?rev=4056&view=rev Author: hadouxad Date: 2008-10-13 17:18:22 +0000 (Mon, 13 Oct 2008) Log Message: ----------- - Refactorisation des .close dans les finally - G?\195?\169rer la liste des noms des nodes dans un fichier a part (couples Id/nom tr?\195?\168s clair et facilement modifiable par un non informaticien) tous les noms de tous les nodes de tous les layout sont dans le meme fichier pour simplifier la recherche - Sauvegarde/chargement des variables user (modif des methodes savein de trpostuservar...) - Gestion des l?\195?\169gendes des graphes ok! recr?\195?\169e les bonens legendes avec els bonens modifs et bonens dimensions -G?\195?\169rer les ?\195?\169crasements de donn?\195?\169es Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.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/persist/EbliWidgetSerializeXml.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-13 08:15:09 UTC (rev 4055) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-13 17:18:22 UTC (rev 4056) @@ -94,8 +94,11 @@ * Retourne la liste persistante des fichiers * @return */ - List<EGCourbePersist> getPersitantCurvesList(){ - return new XmlArrayList( new FileStreamStrategy(getDirectoryCurves())); + List<EGCourbePersist> getPersitantCurvesList(boolean init){ + List<EGCourbePersist> listPersitante=new XmlArrayList(new FileStreamStrategy(getDirectoryCurves())); + if(init) + clearDatas(listPersitante); + return listPersitante; } @@ -103,7 +106,11 @@ * Methode qui nettoie le contenu des datas */ private void clearDatas(List<EGCourbePersist> list ){ - CtuluRemoveContentDirectory.contentDirectoryRemover(getDirectoryCurves()); + //CtuluRemoveContentDirectory.contentDirectoryRemover(getDirectoryCurves()); + if(list==null) + return; + while(list.size()!=0) + list.remove(0); } @@ -122,8 +129,8 @@ if(fichierCourbes.mkdir() || fichierCourbes.isDirectory() ){ //StreamStrategy strategy = new FileStreamStrategy(fichierCourbes); // creates the list of curves: - List<EGCourbePersist> list = new ArrayList<EGCourbePersist>(); - clearDatas(list); + List<EGCourbePersist> listPersitante = getPersitantCurvesList(true); + List<EGGroupPersist> listeGroupePersistance=new ArrayList<EGGroupPersist>(grapheTopersist.getModel().getNbEGObject()); int nbEgObjects=grapheTopersist.getModel().getNbEGObject(); for(int i=0;i<nbEgObjects;i++){ @@ -134,17 +141,17 @@ for(int k=0;k<groupe.getEGChilds().length;k++){ if(groupe.getEGChilds()[k] instanceof EGCourbeChild){ //-- ajout de la courbe persitante dans un fichier avec pour groupee le i eme - list.add(new EGCourbePersist((EGCourbeChild) groupe.getEGChilds()[k],i)); + listPersitante.add(new EGCourbePersist((EGCourbeChild) groupe.getEGChilds()[k],i)); } } }else if(objet instanceof EGCourbeChild){ //le groupe d appartenance est -1 - list.add(new EGCourbePersist((EGCourbeChild) objet,-1)); + listPersitante.add(new EGCourbePersist((EGCourbeChild) objet,-1)); } } - List<EGCourbePersist> listPersitante = getPersitantCurvesList(); - listPersitante.addAll(list); + //List<EGCourbePersist> listPersitante = getPersitantCurvesList(); + //listPersitante.addAll(list); //--on enregistre des infos bidons pour l'utilisateur --// String nbCurves="Nombre courbes: "+grapheTopersist.getModel().getCourbes().length; out.writeObject(nbCurves); @@ -229,7 +236,7 @@ } //-- Etape 4: lecture des courbes --// // get the persitant list of curves: - List<EGCourbePersist> listeCourbesPersistantes = getPersitantCurvesList(); + List<EGCourbePersist> listeCourbesPersistantes = getPersitantCurvesList(false); for(EGCourbePersist cbPersist:listeCourbesPersistantes){ EGGroup container=model.getGroup(cbPersist.Idgroup); EGCourbeChild newCurve=cbPersist.generateCourbe(container); 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-10-13 08:15:09 UTC (rev 4055) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-10-13 17:18:22 UTC (rev 4056) @@ -98,9 +98,9 @@ //-- recuperation du node graphe--// EbliNode nodeGraphe=((EbliScene) parameters.get("scene")).findByWidgetId(idPossessor_); - if(nodeGraphe!=null && nodeGraphe.getCreator() instanceof EbliWidgetControllerGraphe){ + if(nodeGraphe!=null && nodeGraphe.getCreator() instanceof EbliWidgetCreatorGraphe){ //-- on recupere le graphe --// - g=((EbliWidgetControllerGraphe)nodeGraphe.getCreator()).getGraphe(); + g=((EbliWidgetCreatorGraphe)nodeGraphe.getCreator()).getGraphe(); } else g=new EGGraphe(new EGGrapheTreeModel()); 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-10-13 08:15:09 UTC (rev 4055) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java 2008-10-13 17:18:22 UTC (rev 4056) @@ -6,8 +6,6 @@ import java.awt.Point; import java.util.Map; -import javax.swing.UIManager; - import org.fudaa.ctulu.CtuluLibGenerator; import org.fudaa.ebli.trace.TraceLigneModel; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -18,9 +16,6 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetGroup; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorClassLoader; -import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorShape; -import org.netbeans.api.visual.widget.Widget; -import org.w3c.dom.Element; /** * Classe utilisation pour la serialization des donn\xE9es widget @@ -29,8 +24,19 @@ */ public class EbliWidgetSerializeXml { + public static class CoupleNomId { + public String id; + public String nom; + + public CoupleNomId(String _nom, String _id) { + super(); + nom = _nom; + id = _id; + } + + + } - /** * Important: l'id de la widget pour avoir des references . */ @@ -150,7 +156,7 @@ */ public EbliNode generateWidgetInScene(Map parameters, EbliScene scene) throws InstantiationException, IllegalAccessException, ClassNotFoundException{ EbliNode newNode=new EbliNodeDefault(); - newNode.setTitle(title); + newNode.setTitle((String) parameters.get("nodeName")); newNode.setPreferedLocation(new Point(x,y)); if(width>0 && height>0) newNode.setPreferedSize(new Dimension(width,height)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java 2008-10-13 08:15:09 UTC (rev 4055) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java 2008-10-13 17:18:22 UTC (rev 4056) @@ -164,6 +164,71 @@ _db.commit(); } + /** + * Sauvegarde toutes les variabels du projet dans un objet TrPostUserVariableSaver + * @param _src + * @param _prog + * @return + */ + public static TrPostUserVariableSaver saveIn(final TrPostSourceAbstract _src,final ProgressionInterface _prog) { + if ( _src == null) { + return null; + } + + final TrPostUserVariableSaver save = new TrPostUserVariableSaver(); + save.g_ = _src.getGravity().getValue(); + + if (_src.varUserCreateData_ != null) { + final Map map = new HashMap(_src.varUserCreateData_); + // on enleve les variables import\xE9es + final Set varToRemove = new HashSet(); + for (final Iterator it = map.entrySet().iterator(); it.hasNext();) { + final Map.Entry e = (Map.Entry) it.next(); + final TrPostDataCreated created = (TrPostDataCreated) e.getValue(); + final H2dVariableType var = (H2dVariableTypeCreated) e.getKey(); + // pas de sauvegarde possible ou non basee sur une expression + if (!created.isExpr() && created.createSaver() == null) { + varToRemove.add(var); + varToRemove.addAll(TrPostDataCreatedExpr.getAllVarDependingOn(var, _src)); + } + } + if (Fu.DEBUG && FuLog.isDebug()) { + FuLog.debug("vars enlevees\n" + CtuluLibString.arrayToString(varToRemove.toArray())); + } + map.keySet().removeAll(varToRemove); + final Map exprVar = new HashMap(map.size()); + final Map otherVar = new HashMap(map.size()); + for (final Iterator it = map.entrySet().iterator(); it.hasNext();) { + final Map.Entry e = (Map.Entry) it.next(); + final TrPostDataCreated data = ((TrPostDataCreated) e.getValue()); + if (data.isExpr()) { + exprVar.put(e.getKey(), data); + } else { + otherVar.put(e.getKey(), data); + } + } + + save.varCreated_ = new H2dVariableTypeCreated[exprVar.size()]; + save.expr_ = new String[exprVar.size()]; + int idx = 0; + for (final Iterator it = exprVar.entrySet().iterator(); it.hasNext();) { + final Map.Entry e = (Map.Entry) it.next(); + save.varCreated_[idx] = (H2dVariableTypeCreated) e.getKey(); + save.expr_[idx++] = ((TrPostDataCreatedExpr) e.getValue()).getFormule(); + } + save.varCreatedSimple_ = new H2dVariableTypeCreated[otherVar.size()]; + save.saver_ = new TrPostDataCreatedSaver[otherVar.size()]; + for (final Iterator it = otherVar.entrySet().iterator(); it.hasNext();) { + final Map.Entry e = (Map.Entry) it.next(); + save.varCreatedSimple_[idx] = (H2dVariableTypeCreated) e.getKey(); + save.saver_[idx++] = ((TrPostDataCreated) e.getValue()).createSaver(); + } + + } + return save; + } + + public static void fillWithForbidden(final Collection _var, final Set _forbiddenName, final Set _forbiddenShort) { for (final Iterator iter = _var.iterator(); iter.hasNext();) { final H2dVariableType element = (H2dVariableType) iter.next(); 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-10-13 08:15:09 UTC (rev 4055) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-13 17:18:22 UTC (rev 4056) @@ -3,7 +3,7 @@ import java.awt.Dimension; import java.awt.Point; import java.io.File; -import java.io.FileOutputStream; +import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; @@ -20,20 +20,18 @@ import javax.swing.JFileChooser; import javax.swing.JInternalFrame; -import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ctulu.gui.CtuluFileChooser; import org.fudaa.ctulu.gui.CtuluLibSwing; +import org.fudaa.ebli.courbe.EGCourbePersist; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidgetGroup; - import org.fudaa.ebli.visuallibrary.actions.EbliWidgetGroupAction; -import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorGraphe; import org.fudaa.ebli.visuallibrary.persist.EbliSceneSerializeXml; import org.fudaa.ebli.visuallibrary.persist.EbliWidgetSerializeXml; -import org.fudaa.ebli.visuallibrary.persist.ManagerWidgetPersist; +import org.fudaa.ebli.visuallibrary.persist.EbliWidgetSerializeXml.CoupleNomId; import org.fudaa.fudaa.tr.common.TrLib; import org.fudaa.fudaa.tr.common.TrResource; import org.fudaa.fudaa.tr.post.TrPostCommonImplementation; @@ -41,15 +39,15 @@ import org.fudaa.fudaa.tr.post.TrPostMultiSourceActivator; import org.fudaa.fudaa.tr.post.TrPostProjet; import org.fudaa.fudaa.tr.post.TrPostSource; +import org.fudaa.fudaa.tr.post.TrPostSourceAbstract; +import org.fudaa.fudaa.tr.post.TrPostUserVariableSaver; import org.netbeans.api.visual.widget.Widget; -import org.w3c.dom.Document; -import org.w3c.dom.Element; import com.memoire.fu.FuLog; -import com.sun.org.apache.xml.internal.serialize.OutputFormat; -import com.sun.org.apache.xml.internal.serialize.XMLSerializer; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; +import com.thoughtworks.xstream.persistence.FileStreamStrategy; +import com.thoughtworks.xstream.persistence.XmlArrayList; /** * Manager qui se charge de donner les noms standart des balises, @@ -62,606 +60,875 @@ public class TrPostPersistenceManager { - /** - * Utilis\xE9 pour l'extension de tous les fichiers, repertoire et ficheirs - * inclus. - */ - public final static String DEFAULT_EXTENSION = ".POST"; - /** - * Peut etre modifi\xE9 par l'appli appelabt si l'on veut une extension - * diff\xE9rente - */ - public static String EXTENSION = DEFAULT_EXTENSION; - /** - * Fichier qui d\xE9crit tous les contenu layout sauvegard\xE9s Et noms des balises - * importantes - */ - public final static String INFOSCENE = "InfoLayout" + EXTENSION; - public final static String BALISESCENES = "LayoutList"; + /** + * Utilis\xE9 pour l'extension de tous les fichiers, repertoire et ficheirs + * inclus. + */ + public final static String DEFAULT_EXTENSION = ".POST"; + /** + * Peut etre modifi\xE9 par l'appli appelabt si l'on veut une extension + * diff\xE9rente + */ + public static String EXTENSION = DEFAULT_EXTENSION; + /** + * Fichier qui d\xE9crit tous les contenu layout sauvegard\xE9s Et noms des balises + * importantes + */ + public final static String INFOSCENE = "InfoLayout" + EXTENSION; + public final static String BALISESCENES = "LayoutList"; - /** - * Fichier qui d\xE9crit int\xE9gralement le contenu d'une scene - */ - public final static String DESCRIPTORSCENE = "layout"; - public static String ATTRIBUTESCENE="LAYOUT"; + /** + * Fichier qui d\xE9crit int\xE9gralement le contenu d'une scene + */ + public final static String DESCRIPTORSCENE = "layout"; + public static String ATTRIBUTESCENE = "LAYOUT"; - /** - * Attributs pour le ficheirs des sources - */ - public final static String DESCRIPTORSOURCE = "sources" + EXTENSION; - public final static String BALISESOURCES = "SourcesList"; - public static String ATTRIBUTESOURCE="FICHIER"; + /** + * Attributs pour le ficheirs des sources + */ + public final static String DESCRIPTORSOURCE = "sources" + EXTENSION; + public final static String BALISESOURCES = "SourcesList"; + public static String ATTRIBUTESOURCE = "FICHIER"; + public final static String FileWidgetNames = "FramesNames"; + /** + * Le projet a persiter + */ + TrPostProjet trprojet_; - /** - * Le projet a persiter - */ - TrPostProjet trprojet_; + /** + * Nom du projet. Creation du projet sous un repertoire nomProjet.EXTENSION + */ - /** - * Nom du projet. Creation du projet sous un repertoire nomProjet.EXTENSION - */ + ProgressionInterface prog_; + File projet_; + TrPostCommonImplementation ui_; - ProgressionInterface prog_; - File projet_; - TrPostCommonImplementation ui_; + public TrPostPersistenceManager(TrPostProjet projet) { + super(); + trprojet_ = projet; + ui_ = projet.impl_; + prog_ = ui_.getMainProgression(); + } - public TrPostPersistenceManager(TrPostProjet projet) { - super(); - trprojet_=projet; - ui_ = projet.impl_; - prog_ = ui_.getMainProgression(); - - } + public void progression(String title, int progression) { + if (prog_ == null || title == null || progression > 100) + return; + if (progression == 100) { + prog_.setProgression(0); + prog_.setDesc(""); + return; + } + prog_.setDesc(EbliResource.EBLI.getString(title)); + prog_.setProgression(progression); + } + /** + * Cr\xE9\xE9 le repertoire contenant tous les fichiers de donn\xE9es. Base pour la + * cr\xE9ation des donn\xE9es. + */ + public boolean savePersistDirectory() { + // -- creation d un chooser --// + final CtuluFileChooser fileChooser = new CtuluFileChooser(true); + fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre projet")); + fileChooser.setAcceptAllFileFilterUsed(false); + fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + // -- init avec les param noms projet et autre --// + if (projet_ != null) { + fileChooser.setSelectedFile(projet_); + } - public void progression(String title, int progression) { - if (prog_ == null || title == null || progression > 100) - return; - if (progression == 100) { - prog_.setProgression(0); - prog_.setDesc(""); - return; - } - prog_.setDesc(EbliResource.EBLI.getString(title)); - prog_.setProgression(progression); - } + int reponse = fileChooser.showSaveDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); + if (reponse == JFileChooser.APPROVE_OPTION) { + File conteneurProjet = fileChooser.getSelectedFile(); - /** - * Cr\xE9\xE9 le repertoire contenant tous les fichiers de donn\xE9es. Base pour la - * cr\xE9ation des donn\xE9es. - */ - public boolean savePersistDirectory() { - // -- creation d un chooser --// - final CtuluFileChooser fileChooser = new CtuluFileChooser(true); - fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre projet")); - fileChooser.setAcceptAllFileFilterUsed(false); - fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - //-- init avec les param noms projet et autre --// - if(projet_!=null){ - fileChooser.setSelectedFile(projet_); + if (projet_ == null || !projet_.equals(conteneurProjet)) + projet_ = new File(GetExtensionName(conteneurProjet.getAbsolutePath())); + // creation du repertoire global contenant toutes les donn\xE9es + if (projet_.mkdir()) { + return true; + } else - } + if (projet_.isDirectory()) { + return true; + } else { + ui_.error(EbliResource.EBLI.getString("Impossible de cr\xE9er le r\xE9pertoire")); + return false; + } - int reponse = fileChooser.showSaveDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); - if (reponse == JFileChooser.APPROVE_OPTION) { - File conteneurProjet = fileChooser.getSelectedFile(); - - if(projet_==null || !projet_.equals(conteneurProjet)) - projet_ = new File(GetExtensionName(conteneurProjet.getAbsolutePath())); - // creation du repertoire global contenant toutes les donn\xE9es - if (projet_.mkdir()) { - return true; - } else - - if(projet_.isDirectory()){ - return true; - }else - { - ui_.error(EbliResource.EBLI.getString("Impossible de cr\xE9er le r\xE9pertoire")); - return false; - } + } else + return false; + } - - } else - return false; - } + /** + * Retourne un nom avec extension + * + * @param name + * @return + */ + public String GetExtensionName(String name) { + + if (name.contains(EXTENSION)) { + return name; + } else + return name + EXTENSION; + } + + /** + * Charge le repertoire contenant tous les fichiers + * + * @return + */ + public boolean loadPersistDirectory() { + // -- creation d un chooser --// + final CtuluFileChooser fileChooser = new CtuluFileChooser(true); + fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre projet")); + fileChooser.setAcceptAllFileFilterUsed(false); + fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + + // -- init avec les param noms projet et autre --// + if (projet_ != null) { + fileChooser.setSelectedFile(projet_); + + } + + int reponse = fileChooser.showOpenDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); + if (reponse == JFileChooser.APPROVE_OPTION) { + projet_ = fileChooser.getSelectedFile(); + // creation du repertoire global contenant toutes les donn\xE9es + if (projet_.isDirectory()) { + return true; + } else { + ui_.error(EbliResource.EBLI.getString("Impossible de charger le r\xE9pertoire")); + return false; + } + } else + return false; + } + + /** + * Fichier qui cree le fichier qui indique les diff\xE9rents fichiers layout a + * lire. Cela permettra pour la lecture de proposer de charger ou non certains + * layout + * + * @return + * @throws IOException + */ + public void saveDescriptorScenes(File file) { + // -- outputstream du xstream --// + ObjectOutputStream out=null; + try { + out = getParser().createObjectOutputStream(new FileWriter(file)); - /** - * Retourne un nom avec extension - * @param name - * @return - */ - public String GetExtensionName(String name){ - - if(name.contains(EXTENSION)){ - return name; - }else - return name+EXTENSION; + // -- g\xE9n\xE9ration du xml pour la scene --// + int nbFichiersToGenrate = trprojet_.impl_.getAllLayoutFille().size(); + out.writeInt(nbFichiersToGenrate); + for (int i = 0; i < nbFichiersToGenrate; i++) { + // creation du fichier de desciption des scenes + String nomFichierLayout = projet_.getAbsolutePath() + File.separator + DESCRIPTORSCENE + (i + 1) + EXTENSION; + out.writeObject(nomFichierLayout); + } + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); } + finally{ + try { + out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(true); + } + } + + } - /** - * Charge le repertoire contenant tous les fichiers - * @return - */ - public boolean loadPersistDirectory() { - // -- creation d un chooser --// - final CtuluFileChooser fileChooser = new CtuluFileChooser(true); - fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre projet")); - fileChooser.setAcceptAllFileFilterUsed(false); - fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - //-- init avec les param noms projet et autre --// - if(projet_!=null){ - fileChooser.setSelectedFile(projet_); + /** + * Lis les fichiers des layouts a utiliser. + * + * @param file + * @return + * @throws IOException + * @throws ClassNotFoundException + */ + public List<String> loadDescriptorScenes(File file) { + // -- outputstream du xstream --// + List<String> listeFiles = new ArrayList<String>(); + ObjectInputStream in=null; + try { + in = getParser().createObjectInputStream(new FileReader(file)); + + // -- g\xE9n\xE9ration du xml pour la scene --// + int nbFichiersToGenrate = in.readInt(); + + for (int i = 0; i < nbFichiersToGenrate; i++) { + // creation du fichier de desciption des scenes + String nomFichierLayout = (String) in.readObject(); + listeFiles.add(nomFichierLayout); + } + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(false); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(false); + } + finally{ + try { + in.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(false); } - - int reponse = fileChooser.showOpenDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); - if (reponse == JFileChooser.APPROVE_OPTION) { - projet_ = fileChooser.getSelectedFile(); - // creation du repertoire global contenant toutes les donn\xE9es - if (projet_.isDirectory()) { - return true; - } else { - ui_.error(EbliResource.EBLI.getString("Impossible de charger le r\xE9pertoire")); - return false; - } - } else - return false; } + + return listeFiles; + } - /** - * Fichier qui cree le fichier qui indique les diff\xE9rents fichiers layout a - * lire. Cela permettra pour la lecture de proposer de charger ou non certains - * layout - * - * @return - * @throws IOException - */ - public void saveDescriptorScenes(File file) throws IOException { - //-- outputstream du xstream --// - ObjectOutputStream out = getParser().createObjectOutputStream(new FileWriter(file)); - //-- g\xE9n\xE9ration du xml pour la scene --// - int nbFichiersToGenrate=trprojet_.impl_.getAllLayoutFille().size(); - out.writeInt(nbFichiersToGenrate); - for(int i=0;i<nbFichiersToGenrate;i++){ - //creation du fichier de desciption des scenes - String nomFichierLayout=projet_.getAbsolutePath()+File.separator+DESCRIPTORSCENE+(i+1)+EXTENSION; - out.writeObject(nomFichierLayout); - } - out.close(); + + /** + * Recuperation de la liste des variables. + * @param init: si on veut ecraser (sauvegarder) mettre le booleen a true. + * @param path + * @return + */ + List<TrPostUserVariableSaver> getPersitantVariablesList(String path,boolean init){ + + List<TrPostUserVariableSaver> liste=new XmlArrayList( new FileStreamStrategy(new File(path))); + + if(init) + clearDatas(liste); + + return liste; } - - - /** - * Lis les fichiers des layouts a utiliser. - * @param file - * @return - * @throws IOException - * @throws ClassNotFoundException - */ - public List<String> loadDescriptorScenes(File file) throws IOException, ClassNotFoundException { - //-- outputstream du xstream --// - ObjectInputStream in = getParser().createObjectInputStream(new FileReader(file)); - //-- g\xE9n\xE9ration du xml pour la scene --// - int nbFichiersToGenrate=in.readInt(); - List<String> listeFiles=new ArrayList<String>(nbFichiersToGenrate); + private void clearDatas( List<TrPostUserVariableSaver> list ){ + //CtuluRemoveContentDirectory.contentDirectoryRemover(getDirectoryCurves()); + if(list==null) + return; + while(list.size()!=0) + list.remove(0); - for(int i=0;i<nbFichiersToGenrate;i++){ - //creation du fichier de desciption des scenes - String nomFichierLayout=(String) in.readObject(); - listeFiles.add(nomFichierLayout); - } - in.close(); - return listeFiles; } - - /** - * Methode qui g\xE9n\xE8re le fichier contenant toutes les sources ouverts. - * - * @return - * @throws IOException - */ + + /** + * Methode qui g\xE9n\xE8re le fichier contenant toutes les sources ouverts. + * + * @return + * @throws IOException + */ - public void saveSource(File file) throws IOException { - //-- outputstream du xstream --// - ObjectOutputStream out = getParser().createObjectOutputStream(new FileWriter(file)); - //-- g\xE9n\xE9ration du xml pour la scene --// + public void saveSourceAndVariables(File file, String pathVariables) { + // -- outputstream du xstream --// + ObjectOutputStream out =null; + // -- g\xE9n\xE9ration du xml pour la scene --// + try { + out = getParser().createObjectOutputStream(new FileWriter(file)); out.writeInt(trprojet_.listeSrc_.size()); - + + List<TrPostUserVariableSaver>listeVar= getPersitantVariablesList(pathVariables,true); Iterator<TrPostSource> it = trprojet_.listeSrc_.iterator(); - - while (it.hasNext()) { - File f = it.next().getFile(); - out.writeObject(f.getAbsolutePath()); - } + + while (it.hasNext()) { + TrPostSource src=it.next(); + File f = src.getFile(); + out.writeObject(f.getAbsolutePath()); + + //-- sauveagrde de la variable correspondante --// + TrPostUserVariableSaver var=TrPostUserVariableSaver.saveIn((TrPostSourceAbstract) src, null); + listeVar.add(var); + } + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(true); + }finally{ + try { out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(true); } + } + } - /** - * Methode qui ouvre tous les sources et ouvre le trpostProjets correspondants - * @param file - * @throws IOException - * @throws ClassNotFoundException - */ - public void loadSource(File file) throws IOException, ClassNotFoundException { - //-- outputstream du xstream --// - ObjectInputStream in = getParser().createObjectInputStream(new FileReader(file)); - - TrPostMultiSourceActivator multiProjectActivator=new TrPostMultiSourceActivator(trprojet_); - - //-- lecture nb sources pour les sources --// - int nbSources=in.readInt(); - for(int i=0;i<nbSources;i++) { - String path=(String) in.readObject(); - if(path!=null){ - if (trprojet_.isSourceLoaded(path)) { - trprojet_.getImpl().warn(TrLib.getString("Solution d\xE9j\xE0 charg\xE9e"), - TrLib.getString("Le fichier source existe d\xE9j\xE0 et ne peut \xEAtre ajout\xE9 au projet.")); - }else{ - File f = new File(path); - // -- tentative de chargement du source dans le multi-projet --// - - multiProjectActivator.active(f, trprojet_.impl_); - // -- notify aux observers --// - //trprojet_.notifyObservers(); - - - } - } - } - in.close(); - } + /** + * Methode qui ouvre tous les sources et ouvre le trpostProjets correspondants + * + * @param file + * @throws IOException + * @throws ClassNotFoundException + */ + public void loadSourceAndVariables(File file,String pathVariables) { + // -- outputstream du xstream --// + ObjectInputStream in=null; + try { + in = getParser().createObjectInputStream(new FileReader(file)); - - /** - * Methode qui peut etre appel\xE9e pour nettoyer le projet - */ - public void clearProject(){ - int n=0; - List<TrPostSource> liste=new ArrayList<TrPostSource>(); - for(TrPostSource src:trprojet_.listeSrc_) - liste.add(src); - for(TrPostSource src:liste) - trprojet_.removeSource(src, n); - for(JInternalFrame frame:trprojet_.getImpl().getAllInternalFrames()){ - frame.dispose(); - } - } - - /** - * Methode qui tente de sauvegarder tous les fichiers: Soit tout - * les fichiers li\xE9s entre eux sont sauvegard\xE9s, soit les fichier li\xE9s ne le - * sont pas(destruction si n\xE9cessaire) - * - * @return - */ - public boolean saveProject() { - HashMap<String, Object> parametres=new HashMap<String, Object>(); - try { - progression("Cr\xE9ation du r\xE9pertoire", 10); - // -- etape 1 creation du repertoire global --// - if (savePersistDirectory()) { - - - File file; - // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts - progression("Cr\xE9ation du fichier descripteur de sources", 15); - file = new File(projet_.getAbsolutePath() + File.separator + DESCRIPTORSOURCE); - saveSource(file); - - //-- etape 2.5: creation du repertoire des graphe et calques --// - String pathGraphes=projet_.getAbsolutePath() + File.separator +"Graphes"; - try{ - new File(pathGraphes).mkdir(); - }catch(Exception e){ - //pas grave on continue - FuLog.debug("Le repertoire des graphes existe deja"); - } - String pathCalques=projet_.getAbsolutePath() + File.separator +"Calques"; - try{ - new File(pathCalques).mkdir(); - }catch(Exception e){ - //pas grave on continue - FuLog.debug("Le repertoire des calques existe deja"); - } - - // -- etape 3 sauvegarde des ebliscene unitairement --// - progression("Cr\xE9ation des fichiers layout", 20); - - //-- creation des params pour les datas --// - parametres.put("path", projet_.getAbsolutePath()); - parametres.put("pathGraphes",pathGraphes); - parametres.put("pathCalques",pathCalques); - - int cpt = 1; - List<TrPostLayoutFille> listFilles=trprojet_.impl_.getAllLayoutFille(); - for(TrPostLayoutFille fille:listFilles){ - String title = fille.getTitle(); - EbliScene scene = fille.getScene(); - if(listFilles.size()!=0) - progression("Cr\xE9ation du fichier du layout " + title, 20 + 70 / listFilles.size()); - file = new File(projet_.getAbsolutePath() + File.separator + DESCRIPTORSCENE + cpt + EXTENSION); - //-- sauvegarde du persitant --// - parametres.put("dimensions", fille.getSize()); - parametres.put("location", fille.getLocation()); - parametres.put("scene", scene); - savePersitSceneXml(scene,title,file,parametres); - cpt++; + //-- recuperation du multiSourceActivator--// + TrPostMultiSourceActivator multiProjectActivator = new TrPostMultiSourceActivator(trprojet_); - } + //-- recuperation de la listed es variables persistantes --// + List<TrPostUserVariableSaver>listeVar= getPersitantVariablesList(pathVariables,false); + + // -- lecture nb sources pour les sources --// + int nbSources = in.readInt(); + for (int i = 0; i < nbSources; i++) { + String path = (String) in.readObject(); + if (path != null) { + if (trprojet_.isSourceLoaded(path)) { + trprojet_.getImpl().warn(TrLib.getString("Solution d\xE9j\xE0 charg\xE9e"), + TrLib.getString("Le fichier source existe d\xE9j\xE0 et ne peut \xEAtre ajout\xE9 au projet.")); + } else { + File f = new File(path); + // -- tentative de chargement du source dans le multi-projet --// - // -- etape finale: sauvegarde du fichier de descriptions des layout --// - progression("Cr\xE9ation du descripteur de layout", 90); - file = new File(projet_.getAbsolutePath() + File.separator + INFOSCENE); - saveDescriptorScenes(file); - progression("", 100); - ui_.message(TrResource.getS("Sauvegarde termin\xE9e"), TrResource.getS("Sauvegarde termin\xE9e avec succ\xE8s"), false); - return true; + multiProjectActivator.active(f, trprojet_.impl_); + // -- notify aux observers --// + // trprojet_.notifyObservers(); - } - return false; - } catch (IOException ie) { - ie.printStackTrace(); - ui_.error(TrResource.getS("Erreur dans la sauvegarde du projet")); - return false; - } + } + } + } + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(false); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(false); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(false); + }finally{ + try { + in.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(false); } + } + } - /** - * Methode qui charge le projet,l'ensemble des sources et toutes les widgets dans les layouts. - * @return - */ - public boolean loadProject() { - try { - progression("Lecture du r\xE9pertoire", 10); - // -- etape 1 lecture du repertoire global --// - if (loadPersistDirectory()) { - File file; - // -- 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 + DESCRIPTORSOURCE); - loadSource(file); - - // -- etape finale: sauvegarde du fichier de descriptions des layout --// - progression("Cr\xE9ation du descripteur de layout", 20); - file = new File(projet_.getAbsolutePath() + File.separator + INFOSCENE); - List<String> listeFichiers=loadDescriptorScenes(file); - // -- etape finale chargement des ebliscene unitairement --// - progression("Cr\xE9ation des fichiers layout", 30); - //-- creation des params pour les datas --// - HashMap<String, Object> parametres=new HashMap<String, Object>(); - parametres.put("path", projet_.getAbsolutePath()); + /** + * Methode qui peut etre appel\xE9e pour nettoyer le projet + */ + public void clearProject() { + int n = 0; + List<TrPostSource> liste = new ArrayList<TrPostSource>(); + for (TrPostSource src : trprojet_.listeSrc_) + liste.add(src); + for (TrPostSource src : liste) + trprojet_.removeSource(src, n); + for (JInternalFrame frame : trprojet_.getImpl().getAllInternalFrames()) { + frame.dispose(); + } + } - int cpt = 1; - - for(String fichier:listeFichiers){ - file = new File(fichier); - if(listeFichiers.size()!=0) - progression("chargement du fichier " + fichier, 30 + 70 / listeFichiers.size()); - - //-- creation de la trpostlayoutFille --// - TrPostLayoutFille postFrame=new TrPostLayoutFille(trprojet_); - //-- sauvegarde du persitant --// - try { - trprojet_.getImpl().addInternalFrame(postFrame); - loadPersitSceneXml(file,postFrame,parametres); - } catch (InstantiationException e) { - // TODO Auto-generated catch block - ui_.error(TrResource.getS("Erreur dans le chargement du layout. Chargement annul\xE9 pour le fichier ")+fichier); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - ui_.error(TrResource.getS("Erreur dans le chargement du layout. Chargement annul\xE9 pour le fichier ")+fichier); - } + /** + * Methode qui tente de sauvegarder tous les fichiers: Soit tout les fichiers + * li\xE9s entre eux sont sauvegard\xE9s, soit les fichier li\xE9s ne le sont + * pas(destruction si n\xE9cessaire) + * + * @return + */ + public boolean saveProject() { + HashMap<String, Object> parametres = new HashMap<String, Object>(); + + + + progression("Cr\xE9ation du r\xE9pertoire", 10); + // -- etape 1 creation du repertoire global --// + if (savePersistDirectory()) { - } + // -- etape 0: creation du repertoire des graphe et calques --// + String pathGraphes = projet_.getAbsolutePath() + File.separator + "Graphes"; + try { + new File(pathGraphes).mkdir(); + } catch (Exception e) { + // pas grave on continue + FuLog.debug("Le repertoire des graphes existe deja"); + } + String pathCalques = projet_.getAbsolutePath() + File.separator + "Calques"; + try { + new File(pathCalques).mkdir(); + } catch (Exception e) { + // pas grave on continue + FuLog.debug("Le repertoire des calques existe deja"); + } + String pathVariables = projet_.getAbsolutePath() + File.separator + "Variables"; + try { + new File(pathVariables).mkdir(); + } catch (Exception e) { + // pas grave on continue + FuLog.debug("Le repertoire des variables existe deja"); + } + File file; + // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts + progression("Cr\xE9ation du fichier descripteur de sources", 15); + file = new File(projet_.getAbsolutePath() + File.separator + DESCRIPTORSOURCE); + saveSourceAndVariables(file,pathVariables); - - progression("", 100); - ui_.message(TrResource.getS("Chargement termin\xE9"), TrResource.getS("Chargement termin\xE9 avec succ\xE8s"), false); - - - - return true; + - } - return false; - } catch (IOException ie) { - ie.printStackTrace(); - ui_.error(TrResource.getS("Erreur dans la sauvegarde du projet")); - return false; - }catch (ClassNotFoundException ie) { - ie.printStackTrace(); - ui_.error(TrResource.getS("Erreur dans la sauvegarde du projet")); - return false; - } + // -- etape 3 sauvegarde des ebliscene unitairement --// + progression("Cr\xE9ation des fichiers layout", 20); - } + // -- creation des params pour les datas --// + parametres.put("path", projet_.getAbsolutePath()); + parametres.put("pathGraphes", pathGraphes); + parametres.put("pathCalques", pathCalques); + // -- creation de la list des noms des widgets + List<EbliWidgetSerializeXml.CoupleNomId> listeNomsComposants = new ArrayList<CoupleNomId>(); + + int cpt = 1; + List<TrPostLayoutFille> listFilles = trprojet_.impl_.getAllLayoutFille(); + for (TrPostLayoutFille fille : listFilles) { + String title = fille.getTitle(); + EbliScene scene = fille.getScene(); + if (listFilles.size() != 0) + progression("Cr\xE9ation du fichier du layout " + title, 20 + 70 / listFilles.size()); + file = new File(projet_.getAbsolutePath() + File.separator + DESCRIPTORSCENE + cpt + EXTENSION); + // -- sauvegarde du persitant --// + parametres.put("dimensions", fille.getSize()); + parametres.put("location", fille.getLocation()); + parametres.put("scene", scene); + savePersitSceneXml(scene, title, file, parametres, listeNomsComposants); + cpt++; + + } + + // -- etap 4 ecriture du fichier des noms --// + file = new File(projet_.getAbsolutePath() + File.separator + FileWidgetNames); + sauverNomsFrames(file, listeNomsComposants); + + // -- etape finale: sauvegarde du fichier de descriptions des layout + // --// + progression("Cr\xE9ation du descripteur de layout", 90); + file = new File(projet_.getAbsolutePath() + File.separator + INFOSCENE); + saveDescriptorScenes(file); + progression("", 100); + ui_.message(TrResource.getS("Sauvegarde termin\xE9e"), TrResource.getS("Sauvegarde termin\xE9e avec succ\xE8s"), false); + return true; + + } + return false; + + + } + + public void messageError(boolean save){ + if(save) + ui_.error(TrResource.getS("Erreur dans la sauvegarde du projet")); + else + ui_.error(TrResource.getS("Erreur dans le chargement du projet")); + } + + /** + * methode qui sauvegarde tous les noms des widgets dans un meme fichier + * facile d acces. + * + * @param file + * @param liste + */ + public void sauverNomsFrames(File file, List<EbliWidgetSerializeXml.CoupleNomId> liste) { + // -- outputstream du xstream --// + ObjectOutputStream out = null; + try { + out = getParser().createObjectOutputStream(new FileWriter(file)); + out.writeObject(liste); + } catch (IOException e) { + e.printStackTrace(); + } + finally { + try { + out.close(); + } catch (IOException e) { + e.printStackTrace(); + messageError(true); + } + + } + + } + + + /** + * methode qui sauvegarde tous les noms des widgets dans un meme fichier + * facile d acces. + * + * @param file + * @param liste + */ + public List<EbliWidgetSerializeXml.CoupleNomId> loadNomsFrames(File file) { + List<EbliWidgetSerializeXml.CoupleNomId> liste = null; + // -- outputstream du xstream --// + ObjectInputStream out = null; + try { + out = getParser().createObjectInputStream(new FileReader(file)); + liste = (List<CoupleNomId>) out.readObject(); + } catch (IOException e) { + e.printStackTrace(); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } finally { + try { + out.close(); + return liste; + } catch (IOException e) { + e.printStackTrace(); + messageError(false); + } + + } + return null; + } + + /** + * Methode qui charge le projet,l'ensemble des sources et toutes les widgets + * dans les layouts. + * + * @return + */ + public boolean loadProject() { + + progression("Lecture du r\xE9pertoire", 10); + // -- etape 1 lecture du repertoire global --// + if (loadPersistDirectory()) { + File file; + String pathVariables = projet_.getAbsolutePath() + File.separator + "Variables"; + try { + new File(pathVariables).mkdir(); + } catch (Exception e) { + // pas grave on continue + FuLog.debug("Le repertoire des variables existe deja"); + } + + + // -- 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 + DESCRIPTORSOURCE); + loadSourceAndVariables(file,pathVariables); + + // -- etape 3: sauvegarde du fichier de descriptions des layout + // --// + progression("Cr\xE9ation du descripteur de layout", 20); + file = new File(projet_.getAbsolutePath() + File.separator + INFOSCENE); + List<String> listeFichiers = loadDescriptorScenes(file); + + // -- etape 4 chargement des ebliscene unitairement --// + progression("Cr\xE9ation des fichiers layout", 30); + // -- creation des params pour les datas --// + HashMap<String, Object> parametres = new HashMap<String, Object>(); + parametres.put("path", projet_.getAbsolutePath()); + + + // -- etape 5 lecture de la liste des couples nomsfRAME /ID --// + file=new File(projet_.getAbsolutePath() + File.separator +FileWidgetNames); + List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms = loadNomsFrames(file); + + int cpt = 1; + + for (String fichier : listeFichiers) { + file = new File(fichier); + if (listeFichiers.size() != 0) + progression("chargement du fichier " + fichier, 30 + 70 / listeFichiers.size()); + + // -- creation de la trpostlayoutFille --// + TrPostLayoutFille postFrame = new TrPostLayoutFille(trprojet_); + // -- sauvegarde du persitant --// + + trprojet_.getImpl().addInternalFrame(postFrame); + loadPersitSceneXml(file, postFrame, parametres, listeCouplesNoms); + + + } + + + progression("", 100); + ui_.message(TrResource.getS("Chargement termin\xE9"), TrResource.getS("Chargement termin\xE9 avec succ\xE8s"), false); + + + + return true; + + } + return false; + + + } + + + + private XStream parser_; + + private XStream getParser() { + if (parser_ == null) + parser_ = initXmlParser(); + return parser_; + } + + /** + * Init le parser avec les alias adequats. + * + * @return + */ + private XStream initXmlParser() { + XStream xstream = new XStream(new DomDriver()); + // -- creation des alias pour que ce soit + parlant dans le xml file --// + xstream.alias("LAYOUT", EbliSceneSerializeXml.class); + xstream.alias("FRAME", EbliWidgetSerializeXml.class); + xstream.alias("FRAMESNAMES", EbliWidgetSerializeXml.CoupleNomId.class); + return xstream; + } + + /** + * Utilise xstream pour serializer les parametres scene, widget + * + * @throws IOException + */ + private void savePersitSceneXml(EbliScene scene, String title, File file, Map parametres, + List<EbliWidgetSerializeXml.CoupleNomId> listeNomsComposants) { + + // -- outputstream du xstream --// + ObjectOutputStream out=null; + try { + out = getParser().createObjectOutputStream(new FileWriter(file)); - - private XStream parser_; - - private XStream getParser(){ - if(parser_==null) - parser_=initXmlParser(); - return parser_; + + // -- g\xE9n\xE9ration du xml pour la scene --// + out.writeObject(new EbliSceneSerializeXml(scene, title, (Dimension) parametres.get("dimensions"), + (Point) parametres.get("location"))); + + // -- g\xE9n\xE9ration du xml pour les eblinode/widgets --// + // -- ACHTUNG!!! IL FAUT RECUPERER LES OBJETS VIA CHILDREN POUR PRESERVER L + // ORDRE DE SUPERPOSITION!!! --// + Iterator<Widget> it = scene.getLayerVisu().getChildren().iterator(); + + // -- creation d une liste particuliere pour les groupes--// + List<EbliWidgetSerializeXml> listeGroupes = new ArrayList<EbliWidgetSerializeXml>(); + + while (it.hasNext()) { + Widget widget = it.next(); + + if (widget instanceof EbliWidgetGroup) { + // -- cas widget group, il faut recuper ses child --// + EbliNode nodeGroupe = (EbliNode) scene.findObject(widget); + // ecriture de l objet + if (nodeGroupe != null) + listeGroupes.add(new EbliWidgetSerializeXml(nodeGroupe, parametres)); + + for (Widget child : widget.getChildren()) { + EbliNode node = (EbliNode) scene.findObject(child); + // ecriture de l objet + if (node != null) + + out.writeObject(new EbliWidgetSerializeXml(node, parametres)); + listeNomsComposants.add(new EbliWidgetSerializeXml.CoupleNomId(node.getTitle(), node.getWidget().getId())); + } + + } else { + EbliNode node = (EbliNode) scene.findObject(widget); + // ecriture de l objet + if (node != null) + out.writeObject(new EbliWidgetSerializeXml(node, parametres)); + listeNomsComposants.add(new EbliWidgetSerializeXml.CoupleNomId(node.getTitle(), node.getWidget().getId())); + } + } + + // -- ecriture des groupes --// + out.writeInt(listeGroupes.size()); + for (EbliWidgetSerializeXml serializeGroupe : listeGroupes) { + out.writeObject(serializeGroupe); + } + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(true); + }finally{ + try { + out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + messageError(true); } - /** - * Init le parser avec les alias adequats. - * @return - */ - private XStream initXmlParser(){ - XStream xstream = new XStream(new DomDriver()); - //-- creation des alias pour que ce soit + parlant dans le xml file --// - xstream.alias("LAYOUT", EbliSceneSerializeXml.class); - xstream.alias("FRAME", EbliWidgetSerializeXml.class); - return xstream; } - /** - * Utilise xstream pour serializer les parametres scene, widget - * @throws IOException - */ - private void savePersitSceneXml(EbliScene scene,String title,File file, Map parametres) throws IOException{ + } - //-- outputstream du xstream --// - ObjectOutputStream out = getParser().createObjectOutputStream(new FileWriter(file)); + /** + * Methode qui retourne le nom correspondant de la widget + * + * @param listeCouplesNoms + * @param idWidget + * @return + */ + public String getNodeName( List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms, String idWidget) { + for (CoupleNomId couple : listeCouplesNoms) { + if (couple.id.equals(idWidget)) + return couple.nom; + } + return ""; + } + + /** + * Methode qui recupere les infos de la scene et la reconstruit a partir de + * celle vierge fourni en param d'entr\xE9e. + * + * @param file + * le fichier qui contient les infos xml + * @param scenToUpdate + * la scene a remplir avec les infos des fichiers xml + * @throws IOException + * @throws ClassNotFoundException + * @throws IllegalAccessException + * @throws InstantiationException + */ + private void loadPersitSceneXml(File file, TrPostLayoutFille fille, Map parametres, + List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms) { - //-- g\xE9n\xE9ration du xml pour la scene --// - out.writeObject(new EbliSceneSerializeXml(scene,title,(Dimension) parametres.get("dimensions"),(Point) parametres.get("location"))); + EbliScene scenToUpdate = fille.getScene(); + parametres.put("scene", scenToUpdate); + // -- inputstream du xstream --// + ObjectInputStream in = null; + try { + in = getParser().createObjectInputStream(new FileReader(file)); + - //-- g\xE9n\xE9ration du xml pour les eblinode/widgets --// - //-- ACHTUNG!!! IL FAUT RECUPERER LES OBJETS VIA CHILDREN POUR PRESERVER L ORDRE DE SUPERPOSITION!!! --// - Iterator<Widget> it= scene.getLayerVisu().getChildren().iterator(); - - //-- creation d une liste particuliere pour les groupes--// - List<EbliWidgetSerializeXml> listeGroupes=new ArrayList<EbliWidgetSerializeXml>(); - - while(it.hasNext()){ - Widget widget=it.next(); - - - if(widget instanceof EbliWidgetGroup){ - //-- cas widget group, il faut recuper ses child --// - EbliNode nodeGroupe=(EbliNode) scene.findObject(widget); - //ecriture de l objet - if(nodeGroupe !=null) - listeGroupes.add(new EbliWidgetSerializeXml(nodeGroupe,parametres)); - - for(Widget child:widget.getChildren()) { - EbliNode node=(EbliNode) scene.findObject(child); - //ecriture de l objet - if(node !=null) - out.writeObject(new EbliWidgetSerializeXml(node,parametres)); - } - - }else{ - EbliNode node=(EbliNode) scene.findObject(widget); - //ecriture de l objet - if(node !=null) - out.writeObject(new EbliWidgetSerializeXml(node,parametres)); - } - } + // -- r\xE9cup\xE9ration de la scene xml --// + EbliSceneSerializeXml sceneXml = (EbliSceneSerializeXml) in.readObject(); - //-- ecriture des groupes --// - out.writeInt(listeGroupes.size()); - for(EbliWidgetSerializeXml serializeGroupe:listeGroupes){ - out.writeObject(serializeGroupe); - } - - out.close(); + // mise a jour des infos + sceneXml.configureSceneWith(scenToUpdate); + if (sceneXml.getWidth() > 0 && sceneXml.getHeight() > 0) + fille.setSize(sceneXml.getWidth(), sceneXml.getHeight()); + fille.setTitle(sceneXml.getTitle()); + fille.setLocation(sceneXml.getX(), sceneXml.getY()); + // -- preparation de la liste de selection des frames dans le layout --// + final Set<Object> listeNodeSelect = new HashSet<Object>(); - + // -- preparation d'une structure interm\xE9diaire pour optimiser --// + // -- la complexit\xE9 de calcul des groupes (passer en complexit\xE9 lin\xE9aire) + // --// + HashMap<String, HashSet<Object>> listeGroupToPerform = new HashMap<String, HashSet<Object>>(); - } + // -- r\xE9cup\xE9ration via xml des eblinode/widgets --// + for (int i = 0; i < sceneXml.getNbFrames(); i++) { + // lecture xml de l objet + EbliWidgetSerializeXml widgetXml = (EbliWidgetSerializeXml) in.readObject(); - /** - * Methode qui recupere les infos de la scene et la reconstruit a partir de celle vierge fourni en param d'entr\xE9e. - * @param file le fichier qui contient les infos xml - * @param scenToUpdate la scene a remplir avec les infos des fichiers xml - * @throws IOException - * @throws ClassNotFoundException - * @throws IllegalAccessException - * @throws InstantiationException - */ - private void loadPersitSceneXml(File file, TrPostLayoutFille fille, Map parametres) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException{ - - EbliScene scenToUpdate=fille.getScene(); - parametres.put("scene",scenToUpdate); - - //-- inputstream du xstream --// - ObjectInputStream in = getParser().createObjectInputStream(new FileReader(file)); + // generation de la widget dans la scene + parametres.put("nodeName", getNodeName(listeCouplesNoms, widgetXml.getId())); + EbliNode node = widgetXml.generateWidgetInScene(parametres, scenToUpdate); + + // ajout des noeuds a ajouter dans la selection + if (widgetXml.isSelected()) + listeNodeSelect.add(node); + // ajout de la creation d'un groupe + if (!widgetXml.getIdGroup().equals(EbliWidgetGroup.NOGROUP)) { + // il y a un group a prendre en compte d'id + String idGroup = widgetXml.getIdGroup(); + if (listeGroupToPerform.get(idGroup) == null) { + // on init + listeGroupToPerform.put(idGroup, new HashSet<Object>()); + } + // on ajoute l'objet node pour la widget + listeGroupToPerform.get(idGroup).add(node); + } - //-- r\xE9cup\xE9ration de la scene xml --// - EbliSceneSerializeXml sceneXml = (EbliSceneSerializeXml)in.readObject(); + } - //mise a jour des infos - sceneXml.configureSceneWith(scenToUpdate); - if(sceneXml.getWidth()>0 && sceneXml.getHeight()>0) - fille.setSize(sceneXml.getWidth(),sceneXml.getHeight()); - fille.setTitle(sceneXml.getTitle()); - fille.setLocation(sceneXml.getX(),sceneXml.getY()); - - //-- preparation de la liste de selection des frames dans le layout --// - final Set<Object> listeNodeSelect = new HashSet<Object>(); - - //-- preparation d'une structure interm\xE9diaire pour optimiser --// - //-- la complexit\xE9 de calcul des groupes (passer en complexit\xE9 lin\xE9aire) --// - HashMap<String, HashSet<Object>> listeGroupToPerform=new HashMap<String, HashSet<Object>>(); - - //-- r\xE9cup\xE9ration via xml des eblinode/widgets --// - for(int i=0;i<sceneXml.getNbFrames();i++){ - - //lecture xml de l objet - EbliWidgetSerializeXml widgetXml = (EbliWidgetSerializeXml)in.readObject(); - //generation de la widget dans la scene - EbliNode node=widgetXml.generateWidgetInScene(parametres, scenToUpdate); - - //ajout des noeuds a ajouter dans la selection - if(widgetXml.isSelected()) - listeNodeSelect.add(node); - - //ajout de la creation d'un groupe - if(!widgetXml.getIdGroup().equals(EbliWidgetGroup.NOGROUP)){ - //il y a un group a prendre en compte d'id - String idGroup=widgetXml.getIdGroup(); - if(listeGroupToPerform.get(idGroup)==null){ - //on init - listeGroupToPerform.put(idGroup, new HashSet<Object>()); - } - //on ajoute l'objet node pour la widget - listeGroupToPerform.get(idGroup).add(node); - } - - } + // -- lecture des groupes --// + // -- ecriture des groupes --// + int nbGroups = in.readInt(); + HashMap<String, EbliWidgetSerializeXml> listeGroupes = new HashMap<String, EbliWidgetSerializeXml>(); - - //-- lecture des groupes --// - //-- ecriture des groupes --// - int nbGroups=in.readInt(); - HashMap<String,EbliWidgetSerializeXml> listeGroupes=new HashMap<String,EbliWidgetSerializeXml>(); - - for( int i=0;i<nbGroups;i++){ - EbliWidgetSerializeXml group=(EbliWidgetSerializeXml) in.readObject(); - listeGroupes.put(group.getId(),group); - } - - - in.close(); - scenToUpdate.refresh(); - //-- on s'occupe de grouper l'ensemble des widgets --// - for(String idGroup:listeGroupToPerform.keySet()){ - //--l'idGroup est jetable, on ne le sauvegarde pas --// - HashSet<Object> listeToGroup=listeGroupToPerform.get(idGroup); - EbliNode nodeGroup=new EbliWidgetGroupAction(scenToUpdate).performGroup(listeToGroup); - - //-- on met a jour le ebliNode avec les infos du groupe sauv\xE9 --// - EbliWidgetSerializeXml infoGroup=listeGroupes.get(idGroup); - if(infoGroup!=null){ - nodeGroup.setTitle(infoGroup.getTitle()); - nodeGroup.getWidget().setPreferredLocation(new Point(infoGroup.getX(),infoGroup.getY())); - nodeGroup.getWidget().setPreferredSize(new Dimension(infoGroup.getWidth(),infoGroup.getHeight())); - - - } - } - //-- on ajoute les noeuds selectionnes a ebliScene --// - scenToUpdate.setSelectedObjects(listeNodeSelect); - // mise a jour de la scene - scenToUpdate.refresh(); + for (int i = 0; i < nbGroups; i++) { + EbliWidgetSerializeXml group = (EbliWidgetSerializeXml) in.readObject(); + listeGroupes.put(group.getId(), group); + } + + scenToUpdate.refresh(); + // -- on s'occupe de grouper l'ensemble des widgets --// + for (String idGroup : listeGroupToPerform.keySet()) { + // --l'idGroup est jetable, on ne le sauvegarde pas --// + HashSet<Object> listeToGroup = listeGroupToPerform.get(idGroup); + EbliNode... [truncated message content] |
From: <had...@us...> - 2008-10-13 08:19:40
|
Revision: 4055 http://fudaa.svn.sourceforge.net/fudaa/?rev=4055&view=rev Author: hadouxad Date: 2008-10-13 08:15:09 +0000 (Mon, 13 Oct 2008) Log Message: ----------- MAJ Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.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/EGGraphePersist.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/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/persist/ManagerWidgetPersist.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/GraphePersist.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.java 2008-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGenerator.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -24,7 +24,7 @@ /** * Tous les nombres seront inf\xE9rieurs a Max-1 */ - private static long MAX=65535; + private long max=65535; /** * Pour avoir toujours la meme sequence, il suffit de mettre le mode debug a true, @@ -80,7 +80,7 @@ public long useCongruenceLineaireGenerateur(){ - old= (a_*old + c_)% MAX; + old= (a_*old + c_)% max; return old; } @@ -100,13 +100,19 @@ * @return */ public long deliverUniqueId(){ + int nbTentatives=0; Long id; do{ + nbTentatives++; + if(nbTentatives>max-1){ + clear(); + } + id=new Long(useCongruenceLineaireGenerateur()); } while(constraints_.contains(id)); addConstraint(id); - FuLog.warning("Generation ID="+id); + return id; } @@ -144,4 +150,12 @@ long val=Long.parseLong(value); constraints_.remove(new Long(val)); } + + public long getMax() { + return max; + } + + public void setMax(long max) { + this.max = max; + } } Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -0,0 +1,95 @@ +package org.fudaa.ctulu; + +import java.io.File; +/** + * Classe qui permet de faire le m\xE9nage dans un repertoire. + * On fournit le repertoire cible. + * le thread supprime le contenu du repertoire (tous les fichiers du repertoire.) + * @author Adrien Hadoux + * + */ +public class CtuluRemoveContentDirectory { + + + public File[] listing; + + public File Finit; + + /** + * Methode statique a appeler pour effacer recursivemetn le contenu d un repertoire + * @param file + */ + public static void contentDirectoryRemover(File file){ + new CtuluRemoveContentDirectory (file).demarrerSupression(); + } + + + public CtuluRemoveContentDirectory(File Finit) { + // on recupere le parametre + this.Finit = Finit; + + } + + + + + public void demarrerSupression() { + // on verifie si c'est un repertoire ..... + if (Finit.isDirectory()) { + // si s'en est un on liste son contenu + listing = Finit.listFiles(); + + + // tant qu'il y a des sous repertoires .... + while (listing.length > 0) { + // poiur chaque sous repertoire ... + for (int i = 0; i < listing.length; i++) { + // ...on verifie si c'est des fichier ... + if (listing[i].isFile()) { + // ... si ca en est on les supprime + boolean b = listing[i].delete(); + // on verifie si tout c'est bien passe + System.out.println("suppession de :" + listing[i] + ":" + + b); + } + // si c'est un repertoire on demare une methode... +// else{ +// // on demare la methode +// removeDirectoryContentRecursivly(listing[i]); +// } + } + } + + } + + + } + + + + private void removeDirectoryContentRecursivly(File ToDel) { + + File[] listing2 = ToDel.listFiles(); + + if(listing2==null || listing2.length==0) + return; + for (int i= 0;i<listing2.length; i++) { + // ...verifie si c'est un fichier + if (listing2[i].isFile()) { + // on le supprime et on verifie que c'est bon + boolean b = listing2[i].delete(); + + } + // sinon c'est un repertoire + else { + // on applique de nouveau la methode sur le repertoire + removeDirectoryContentRecursivly(listing2[i]); + } + } + } + + + + + +} 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-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -563,10 +563,10 @@ List<Double> listeX=getListValueForVariableForSeparator(getSeparator(separatorX), varX+1); List<Double> listeY=getListValueForVariableForSeparator(getSeparator(separatorY), varY+1); - double[] tabX = new double[listeX.size()]; - double[] tabY = new double[listeY.size()]; + double[] tabX = new double[Math.min(listeX.size(), listeY.size())]; + double[] tabY = new double[Math.min(listeX.size(), listeY.size())]; - for (int j = 0; j < listeX.size(); j++) { + for (int j = 0; j < Math.min(listeX.size(), listeY.size()); j++) { tabX[j] = listeX.get(j); tabY[j] = listeY.get(j); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -8,9 +8,11 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import java.util.Map; +import org.fudaa.ctulu.CtuluRemoveContentDirectory; import org.fudaa.ebli.visuallibrary.persist.EbliSceneSerializeXml; import org.fudaa.ebli.visuallibrary.persist.EbliWidgetSerializeXml; @@ -96,7 +98,16 @@ return new XmlArrayList( new FileStreamStrategy(getDirectoryCurves())); } + /** + * Methode qui nettoie le contenu des datas + */ + private void clearDatas(List<EGCourbePersist> list ){ + CtuluRemoveContentDirectory.contentDirectoryRemover(getDirectoryCurves()); + + } + + /** * Enrtegistre le graphe au format persistant xml. * @param parameters des parametres supplementaires utiles. * @throws IOException @@ -108,13 +119,14 @@ //-- enregistrement des courbes --// // strategy pour la liste xml: aun fichier par courbe. File fichierCourbes=getDirectoryCurves(); - if(fichierCourbes.mkdir()){ - StreamStrategy strategy = new FileStreamStrategy(fichierCourbes); + if(fichierCourbes.mkdir() || fichierCourbes.isDirectory() ){ + //StreamStrategy strategy = new FileStreamStrategy(fichierCourbes); // creates the list of curves: - List<EGCourbePersist> list = getPersitantCurvesList(); + List<EGCourbePersist> list = new ArrayList<EGCourbePersist>(); + clearDatas(list); List<EGGroupPersist> listeGroupePersistance=new ArrayList<EGGroupPersist>(grapheTopersist.getModel().getNbEGObject()); - - for(int i=0;i<grapheTopersist.getModel().getNbEGObject();i++){ + int nbEgObjects=grapheTopersist.getModel().getNbEGObject(); + for(int i=0;i<nbEgObjects;i++){ EGObject objet=grapheTopersist.getModel().getEGObject(i); if(objet instanceof EGGroup){ EGGroup groupe=(EGGroup) objet; @@ -131,7 +143,8 @@ list.add(new EGCourbePersist((EGCourbeChild) objet,-1)); } } - + List<EGCourbePersist> listPersitante = getPersitantCurvesList(); + listPersitante.addAll(list); //--on enregistre des infos bidons pour l'utilisateur --// String nbCurves="Nombre courbes: "+grapheTopersist.getModel().getCourbes().length; out.writeObject(nbCurves); Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/GraphePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/GraphePersist.java 2008-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/GraphePersist.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -1,13 +0,0 @@ -package org.fudaa.ebli.courbe; - - -/** - * Classe qui r\xE9cup\xE8re les donn\xE9es courbes d'un graphe et enregistre les parametres - * @author Adrien Hadoux - * - */ -public class GraphePersist { - - - -} 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-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -306,5 +306,24 @@ public EbliWidgetJXTreeTableModel getTreeModel() { return treeModel_; } - + + /** + * Methode qui retourne l'ebliNode correspondant a l id de widget. + * Retourne null sinon. + * @param id + * @return + */ + public EbliNode findByWidgetId(String id) + { + + for(Object objet:this.getObjects()){ + if(objet instanceof EbliNode){ + EbliNode cible=(EbliNode)objet; + if(cible.getWidget().getId().equals(id)) + return cible; + } + } + return null; + + } } 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-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -25,6 +25,8 @@ import org.netbeans.api.visual.model.ObjectState; import org.netbeans.api.visual.widget.Widget; +import com.memoire.fu.FuLog; + /** * Widget version EBLI * @@ -70,6 +72,7 @@ public EbliWidget(final EbliScene scene) { super(scene); id_ = scene.generateId(); + FuLog.warning("Generation frame ID="+id_); setScene(scene); // -- remplisage de la map de propriete grahiques --// 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-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -20,6 +20,7 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; +import org.fudaa.ebli.visuallibrary.persist.ManagerWidgetPersist; import org.w3c.dom.Element; import com.hexidec.ekit.FudaaAlignAction; @@ -117,12 +118,12 @@ public Object getPersistData(Map parameters) { // TODO Auto-generated method stub //-- generation d'un identifiant unique pour le repertoire du graphe --// - String pathUnique=parameters.get("pathGraphes")+File.separator+FuLib.clean(File.separator+parameters.get("nodeName"))+res.getIntern().getId(); - + // String pathUnique=parameters.get("pathGraphes")+File.separator+FuLib.clean(File.separator+parameters.get("nodeName"))+res.getIntern().getId(); + String pathUnique=ManagerWidgetPersist.generateGraphPath((String)parameters.get("pathGraphes"), res.getEbliScene().findByWidgetId(res.getId())); //- sauvegarde du contenu de l eggraphe dans un repertoire a part --// try { File createRep=new File(pathUnique); - if( createRep.mkdir()) + if( createRep.mkdir() || createRep.isDirectory()) new EGGraphePersist(pathUnique,parameters).savePersitGrapheXml(getGraphe()); } catch (IOException e) { // TODO Auto-generated catch block 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-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -13,6 +13,7 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; import org.fudaa.ebli.visuallibrary.calque.EbliWidgetControllerCalque; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; +import org.fudaa.ebli.visuallibrary.persist.ManagerWidgetPersist; import org.netbeans.api.visual.widget.Widget; import org.w3c.dom.Element; @@ -21,11 +22,11 @@ EGGraphe g; // EbliWidget res; EbliWidgetWithBordure res; - private String IdPossessor_; + private String idPossessor_; public EbliWidgetCreatorLegende(EGGraphe g,String id) { super(); this.g = g; - IdPossessor_=id; + idPossessor_=id; } public EbliWidgetCreatorLegende(){ @@ -61,7 +62,8 @@ @Override public Object getPersistData(Map parameters) { // TODO Auto-generated method stub - return IdPossessor_; + + return idPossessor_; } @@ -69,26 +71,45 @@ // TODO Auto-generated method stub if(data==null) g=new EGGraphe(new EGGrapheTreeModel()); +// else{ +// String idGraphe=(String) data; +// +// EbliScene scene=(EbliScene) parameters.get("scene"); +// //-- recherche de la widget qui contient l'id et rejouer l'action ajouter legende --// +// for(Widget widget: scene.getLayerVisu().getChildren()){ +// EbliWidget candidat=null; +// if(widget instanceof EbliWidgetBordureSingle) +// candidat=((EbliWidgetBordureSingle) widget).getIntern(); +// else +// candidat=(EbliWidget) widget; +// +// if(candidat.getId().equals(idGraphe)){ +// //--on a le bon, on rejoue la legende --// +// ((EbliWidgetControllerGraphe)candidat.getController()).ajoutLegende(); +// return; +// } +// } +// } else{ - String idGraphe=(String) data; - - EbliScene scene=(EbliScene) parameters.get("scene"); - //-- recherche de la widget qui contient l'id et rejouer l'action ajouter legende --// - for(Widget widget: scene.getLayerVisu().getChildren()){ - EbliWidget candidat=null; - if(widget instanceof EbliWidgetBordureSingle) - candidat=((EbliWidgetBordureSingle) widget).getIntern(); + //--recuperation de l'id du graphe parent--// + if(data instanceof String){ + idPossessor_=(String) data; + + //-- recuperation du node graphe--// + EbliNode nodeGraphe=((EbliScene) parameters.get("scene")).findByWidgetId(idPossessor_); + + if(nodeGraphe!=null && nodeGraphe.getCreator() instanceof EbliWidgetControllerGraphe){ + //-- on recupere le graphe --// + g=((EbliWidgetControllerGraphe)nodeGraphe.getCreator()).getGraphe(); + } else - candidat=(EbliWidget) widget; + g=new EGGraphe(new EGGrapheTreeModel()); - if(candidat.getId().equals(idGraphe)){ - //--on a le bon, on rejoue la legende --// - ((EbliWidgetControllerGraphe)candidat.getController()).ajoutLegende(); - return; - } + } + else + g=new EGGraphe(new EGGrapheTreeModel()); } - } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/ManagerWidgetPersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/ManagerWidgetPersist.java 2008-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/ManagerWidgetPersist.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -18,10 +18,12 @@ import org.fudaa.ctulu.gui.CtuluFileChooser; import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliScene; import org.w3c.dom.Document; import org.w3c.dom.Element; +import com.memoire.fu.FuLib; import com.memoire.fu.FuLog; import com.sun.org.apache.xml.internal.serialize.OutputFormat; import com.sun.org.apache.xml.internal.serialize.XMLSerializer; @@ -36,68 +38,22 @@ public class ManagerWidgetPersist { - - - - public ManagerWidgetPersist() { - super(); - + /** + * Methode qui genere le path vers le graphe. + * + * @return + */ + public static String generateGraphPath(String path, EbliNode nodeGraphe){ + + return path+File.separator+File.separator+FuLib.clean(nodeGraphe.getTitle())+nodeGraphe.getWidget().getId(); + } - - - - /** - * Fichier qui cree le fichier qui indique les diff\xE9rents fichiers layout a - * lire. Cela permettra pour la lecture de proposer de charger ou non certains - * layout - * - * @return - */ - public static Document createDescriptorScenes(Document document, ArrayList<String> titles,String path, String baliseScene, String descriptorScene,String extension, String attribute) { - // creation du root - Element rootEle = document.createElement(baliseScene); - document.appendChild(rootEle); - // On cree des objets sans contenus qui decrivent simplement les fichiers - // scenes - Iterator<String> it = titles.iterator(); - int cpt = 1; - while (it.hasNext()) { - it.next(); - // contient le path absolu vers le fichier qui decrit le layout - rootEle.setAttribute(attribute+cpt, path + File.separator + descriptorScene + (cpt++) - + extension); -// Element sceneEle = document.createElement(path + File.separator + descriptorScene + cpt -// + extension); -// rootEle.appendChild(sceneEle); - } - return document; - } - + - /** - * Genere un document type dom - * - * @return Document - */ - public static Document createDocument() { - // get an instance of factory - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - try { - // get an instance of builder - DocumentBuilder db = dbf.newDocumentBuilder(); - // create an instance of DOM - Document dom = db.newDocument(); - return dom; - } catch (ParserConfigurationException pce) { - FuLog.debug("Error while trying to instantiate DocumentBuilder " + pce); - 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-10-12 14:20:03 UTC (rev 4054) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-13 08:15:09 UTC (rev 4055) @@ -387,6 +387,7 @@ //-- sauvegarde du persitant --// parametres.put("dimensions", fille.getSize()); parametres.put("location", fille.getLocation()); + parametres.put("scene", scene); savePersitSceneXml(scene,title,file,parametres); cpt++; @@ -525,14 +526,16 @@ while(it.hasNext()){ Widget widget=it.next(); - EbliNode nodeGroupe=(EbliNode) scene.findObject(widget); - //ecriture de l objet - if(nodeGroupe !=null) - listeGroupes.add(new EbliWidgetSerializeXml(nodeGroupe,parametres)); + if(widget instanceof EbliWidgetGroup){ - //-- cas widget group, il faut recuper ses child car on se fout du groupe --// - for(Widget child:widget.getChildren()) { + //-- cas widget group, il faut recuper ses child --// + EbliNode nodeGroupe=(EbliNode) scene.findObject(widget); + //ecriture de l objet + if(nodeGroupe !=null) + listeGroupes.add(new EbliWidgetSerializeXml(nodeGroupe,parametres)); + + for(Widget child:widget.getChildren()) { EbliNode node=(EbliNode) scene.findObject(child); //ecriture de l objet if(node !=null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |