From: <opa...@us...> - 2008-08-07 22:44:57
|
Revision: 3739 http://fudaa.svn.sourceforge.net/fudaa/?rev=3739&view=rev Author: opasteur Date: 2008-08-07 22:45:03 +0000 (Thu, 07 Aug 2008) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierMethodeOpt.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierTypeLit.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierApportCrueCalageAuto.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCalageAuto.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCrueCalageAuto.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierMesureCrueCalageAuto.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierParametresCalageAuto.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierResultatsCalageAuto.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/CConversionHydraulique1d.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCrueCalagePanel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCruesCalageEditor.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLaissesEditor.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dListingsCalageEditor.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresCalageEditor.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dZoneFrottementEditor.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauLaisseModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementCalageModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -20,6 +20,7 @@ import org.fudaa.dodico.boony.BoonyXgzSerializer; import org.fudaa.dodico.boony.BoonyXmlDeserializer; import org.fudaa.dodico.boony.BoonyXmlSerializer; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; import org.fudaa.dodico.hydraulique1d.metier.calageauto.*; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierMethodeOpt.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierMethodeOpt.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierMethodeOpt.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -12,21 +12,21 @@ { private int __value; private static int __size = 3; - private static org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt[] __array = new org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt [__size]; + private static org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt[] __array = new org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt [__size]; public static final int _DESCENTE_OPTIMALE = 0; - public static final org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt DESCENTE_OPTIMALE = new org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt(_DESCENTE_OPTIMALE); + public static final org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt DESCENTE_OPTIMALE = new org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt(_DESCENTE_OPTIMALE); public static final int _CASIER_NEWTON = 1; - public static final org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt CASIER_NEWTON = new org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt(_CASIER_NEWTON); + public static final org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt CASIER_NEWTON = new org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt(_CASIER_NEWTON); public static final int _ALGO_GENETIQUE = 2; - public static final org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt ALGO_GENETIQUE = new org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt(_ALGO_GENETIQUE); + public static final org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt ALGO_GENETIQUE = new org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt(_ALGO_GENETIQUE); public int value () { return __value; } - public static org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt from_int (int value) + public static org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt from_int (int value) { if (value >= 0 && value < __size) return __array[value]; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierTypeLit.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierTypeLit.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierTypeLit.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -14,19 +14,19 @@ { private int __value; private static int __size = 2; - private static org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit[] __array = new org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit [__size]; + private static org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit[] __array = new org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit [__size]; public static final int _MINEUR = 0; - public static final org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit MINEUR = new org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit(_MINEUR); + public static final org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit MINEUR = new org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit(_MINEUR); public static final int _MAJEUR = 1; - public static final org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit MAJEUR = new org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit(_MAJEUR); + public static final org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit MAJEUR = new org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit(_MAJEUR); public int value () { return __value; } - public static org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit from_int (int value) + public static org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit from_int (int value) { if (value >= 0 && value < __size) return __array[value]; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierApportCrueCalageAuto.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierApportCrueCalageAuto.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierApportCrueCalageAuto.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -8,7 +8,7 @@ */ package org.fudaa.dodico.hydraulique1d.metier.calageauto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierApportCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierApportCrueCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCalageAuto.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCalageAuto.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCalageAuto.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -8,10 +8,10 @@ */ package org.fudaa.dodico.hydraulique1d.metier.calageauto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierCalageAuto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierParametresCalageAuto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierResultatsCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierParametresCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierResultatsCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; import org.fudaa.dodico.hydraulique1d.metier.MetierZoneFrottement; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCrueCalageAuto.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCrueCalageAuto.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCrueCalageAuto.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -8,9 +8,9 @@ */ package org.fudaa.dodico.hydraulique1d.metier.calageauto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierApportCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierMesureCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierApportCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierMesureCrueCalageAuto.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierMesureCrueCalageAuto.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierMesureCrueCalageAuto.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -8,7 +8,7 @@ */ package org.fudaa.dodico.hydraulique1d.metier.calageauto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierMesureCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierParametresCalageAuto.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierParametresCalageAuto.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierParametresCalageAuto.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -8,9 +8,9 @@ */ package org.fudaa.dodico.hydraulique1d.metier.calageauto; -import org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierMethodeOpt; -import org.fudaa.dodico.hydraulique1d.calageauto.EnumMetierTypeLit; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierParametresCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierParametresCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; @@ -32,7 +32,8 @@ super(); pasGradient_=1; nbMaxIterations_=100; - typeLit_=org.fudaa.dodico.hydraulique1d.calageauto.MINEUR; + typeLit_= org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit.MINEUR; + precision_=0.01; roInit_=1; methodeOpt_=EnumMetierMethodeOpt.DESCENTE_OPTIMALE; @@ -69,7 +70,7 @@ + " nbMaxIterations : " + nbMaxIterations_ + " typeLit : " - + (typeLit_.equals(org.fudaa.dodico.hydraulique1d.calageauto.MINEUR) ? "mineur":"majeur") + + (typeLit_.equals( org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit.MINEUR) ? "mineur":"majeur") + " precision : " + precision_ + " roInit : " Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierResultatsCalageAuto.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierResultatsCalageAuto.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierResultatsCalageAuto.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -8,7 +8,7 @@ */ package org.fudaa.dodico.hydraulique1d.metier.calageauto; -import org.fudaa.dodico.hydraulique1d.calageauto.MetierResultatsCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierResultatsCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; import org.fudaa.dodico.hydraulique1d.metier.MetierResultatsTemporelSpatial; import org.fudaa.dodico.hydraulique1d.metier.MetierZoneFrottement; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/CConversionHydraulique1d.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/CConversionHydraulique1d.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/CConversionHydraulique1d.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -18,11 +18,11 @@ import org.fudaa.dodico.corba.mascaret.SParametresREP; import org.fudaa.dodico.corba.mascaret.SParametresTailleMaxFichier; import org.fudaa.dodico.corba.objet.IConnexion; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierResultatsCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierCalculHydraulique1d; import org.fudaa.dodico.hydraulique1d.metier.MetierEtude1d; import org.fudaa.dodico.hydraulique1d.metier.MetierParametresTailleMaxFichier; import org.fudaa.dodico.hydraulique1d.metier.MetierResultatsGeneraux; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierResultatsCalageAuto; /** * Classe qui contient des m\xE9thodes utiles \xE0 la conversion entre les 2 mod\xE8les. * Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -99,6 +99,12 @@ import org.fudaa.dodico.corba.mascaret.SResultatsTemporelSpatial; import org.fudaa.dodico.corba.mascaret.SResultatsTemporelSpatialBief; import org.fudaa.dodico.corba.mascaret.SResultatsVariable; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierApportCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierParametresCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.EnumMetierCondLimiteImposee; import org.fudaa.dodico.hydraulique1d.metier.EnumMetierCritereArret; import org.fudaa.dodico.hydraulique1d.metier.EnumMetierLimiteCalcule; @@ -137,12 +143,6 @@ import org.fudaa.dodico.hydraulique1d.metier.MetierZone; import org.fudaa.dodico.hydraulique1d.metier.MetierZoneFrottement; import org.fudaa.dodico.hydraulique1d.metier.MetierZonePlanimetrage; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierApportCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierParametresCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.casier.MetierGeometrieCasier; import org.fudaa.dodico.hydraulique1d.metier.casier.MetierPlanimetrageCasier; import org.fudaa.dodico.hydraulique1d.metier.evenement.Notifieur; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -93,6 +93,13 @@ import org.fudaa.dodico.corba.mascaret.SResultatsTemporelSpatial; import org.fudaa.dodico.corba.mascaret.SResultatsTemporelSpatialBief; import org.fudaa.dodico.corba.mascaret.SResultatsVariable; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierApportCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierParametresCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.EnumMetierCondLimiteImposee; import org.fudaa.dodico.hydraulique1d.metier.EnumMetierCritereArret; import org.fudaa.dodico.hydraulique1d.metier.EnumMetierLimiteCalcule; @@ -134,13 +141,6 @@ import org.fudaa.dodico.hydraulique1d.metier.MetierZone; import org.fudaa.dodico.hydraulique1d.metier.MetierZoneFrottement; import org.fudaa.dodico.hydraulique1d.metier.MetierZonePlanimetrage; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierApportCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierParametresCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.casier.MetierChenalLiaison; import org.fudaa.dodico.hydraulique1d.metier.casier.MetierNuagePointsCasier; import org.fudaa.dodico.hydraulique1d.metier.casier.MetierOrificeLiaison; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCrueCalagePanel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCrueCalagePanel.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCrueCalagePanel.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -18,10 +18,10 @@ import javax.swing.JScrollPane; import javax.swing.border.TitledBorder; -import org.fudaa.dodico.hydraulique1d.metier.MetierReseau; import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierApportCrueCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.MetierReseau; import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dLigneReelTableau; import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dTableauReel; import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dTableauReelModel; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCruesCalageEditor.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCruesCalageEditor.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCruesCalageEditor.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -20,9 +20,9 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierEtude1d; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; import org.fudaa.ebli.commun.EbliPreferences; import org.fudaa.ebli.dialog.BDialogContent; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLaissesEditor.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLaissesEditor.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLaissesEditor.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -10,10 +10,10 @@ import java.awt.event.ActionEvent; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierDonneesHydrauliques; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; import org.fudaa.dodico.hydraulique1d.metier.MetierReseau; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; import org.fudaa.ebli.commun.EbliPreferences; import org.fudaa.fudaa.hydraulique1d.CGlobal; import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dTableauLaisseModel; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dListingsCalageEditor.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dListingsCalageEditor.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dListingsCalageEditor.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -27,8 +27,8 @@ import javax.swing.text.StyledDocument; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierResultatsCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierResultatsCalageAuto; import org.fudaa.ebli.commun.EbliListModelLargeString; import org.fudaa.ebli.commun.EbliPreferences; import org.fudaa.ebli.dialog.BDialogContent; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresCalageEditor.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresCalageEditor.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresCalageEditor.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -17,10 +17,10 @@ import javax.swing.border.Border; import javax.swing.border.EtchedBorder; -import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierMethodeOpt; import org.fudaa.dodico.hydraulique1d.metier.calageauto.EnumMetierTypeLit; import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierParametresCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; import org.fudaa.ebli.commun.EbliPreferences; import org.fudaa.ebli.dialog.BDialogContent; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dZoneFrottementEditor.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dZoneFrottementEditor.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dZoneFrottementEditor.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -10,8 +10,8 @@ import java.awt.event.ActionEvent; import java.io.File; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; import org.fudaa.ebli.commun.EbliPreferences; import org.fudaa.fudaa.hydraulique1d.CGlobal; import org.fudaa.fudaa.hydraulique1d.Hydraulique1dBaseApplication; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauLaisseModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauLaisseModel.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauLaisseModel.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -11,12 +11,12 @@ import java.util.ArrayList; import java.util.List; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierDonneesHydrauliques; import org.fudaa.dodico.hydraulique1d.metier.MetierLaisse; import org.fudaa.dodico.hydraulique1d.metier.MetierSite; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCrueCalageAuto; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierMesureCrueCalageAuto; import org.fudaa.fudaa.hydraulique1d.Hydraulique1dImport; /** Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementCalageModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementCalageModel.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementCalageModel.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -11,8 +11,8 @@ import java.util.ArrayList; import java.util.List; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierZoneFrottement; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; /** * Mod\xE8le de tableau pour les zones de frottements calage. Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java 2008-08-07 22:23:48 UTC (rev 3738) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java 2008-08-07 22:45:03 UTC (rev 3739) @@ -11,9 +11,9 @@ import java.util.ArrayList; import java.util.List; +import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; import org.fudaa.dodico.hydraulique1d.metier.MetierBief; import org.fudaa.dodico.hydraulique1d.metier.MetierZoneFrottement; -import org.fudaa.dodico.hydraulique1d.metier.calageauto.MetierCalageAuto; /** * Mod\xE8le de tableau pour les zones de frottements. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <opa...@us...> - 2008-08-08 15:17:27
|
Revision: 3741 http://fudaa.svn.sourceforge.net/fudaa/?rev=3741&view=rev Author: opasteur Date: 2008-08-08 15:17:33 +0000 (Fri, 08 Aug 2008) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/dodico/idl/code/mascaret.idl trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/DeserializerHandlerVersion04.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierProfil.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DCalculMascaret.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/MascaretClient.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dExport.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProfilModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProjet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dBiefEditor.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierGeometriePanel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneProfilTableau.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauProfilsModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java Modified: trunk/fudaa_devel/dodico/idl/code/mascaret.idl =================================================================== --- trunk/fudaa_devel/dodico/idl/code/mascaret.idl 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/idl/code/mascaret.idl 2008-08-08 15:17:33 UTC (rev 3741) @@ -833,6 +833,7 @@ reel absc; // abscisse utilisateur du profil VSParametresPt pts; // les points du profil booleen avecGeoReferencement; //booleen indiquant la pr\xE9sence de g\xE9or\xE9f\xE9rencement ou non + chaine infoGeoReferencement; //Contient le infos du g\xE9or\xE9f\xE9rencement indiqu\xE9 dans l'en-tete du ficher }; typedef sequence <SParametresProfil> VSParametresProfil; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -661,6 +661,8 @@ } stemp = entite.isDefautValuesValides(); final String app = (String) mapEncours.get(kw_.getApparence()); + System.err.println("app "+app); + System.err.println("stemp "+stemp); if (stemp != null && ((app == null) || (app.indexOf("IS REQUIRED") < 0))) { analyze_.addFatalError(getQuoteString() + noms[0] + "': " + DicoResource.getS("Les valeurs par d\xE9faut sont invalides"), ligne); Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/DeserializerHandlerVersion04.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/DeserializerHandlerVersion04.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/DeserializerHandlerVersion04.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -58,7 +58,7 @@ private List singles_; private final Map typeClass_; - + private final Map classNameTypeData_ = new TreeMap(); /** @@ -89,10 +89,10 @@ * Mapping des anciennes classes dans les nouvelles. */ private String getNewClassName(final String _c) throws ClassNotFoundException { + final String PK_DODICO_HYDR="org.fudaa.dodico.hydraulique1d."; final String PK_DODICO_CORBA_HYDR="org.fudaa.dodico.corba.hydraulique1d."; final String PK_DODICO_CORBA_GEOM="org.fudaa.dodico.corba.geometrie."; - String newpk; String newname; @@ -116,6 +116,7 @@ else if (oldpk.startsWith(PK_DODICO_CORBA_GEOM)) { newpk="org.fudaa.dodico.hydraulique1d.metier.geometrie."; } + // Aucun changement. else { return _c; @@ -163,6 +164,7 @@ protected Field getField(final Class _c, final String _name) { final String s = _c.getName(); + TypeData d = (TypeData) classNameTypeData_.get(s); if (d == null) { d = new TypeData(); Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -38,7 +38,8 @@ */ public class MetierEtude1d extends MetierHydraulique1d { // IMPORTANT: NE PAS OUBLIER D'INCREMENTER CE NUMERO A CHAQUE MODIF DU FORMAT - public final static String FORMAT_VERSION= "0.5"; // Les objets metiers ne sont plus corba, mais Java. + public final static String FORMAT_VERSION= "0.6"; // Les objets metiers ont \xE9t\xE9 d\xE9plac\xE9s de fudaa.hydraulique1d \xE0 dodico.hydraulique1d. + public final static String FORMAT_VERSION_0_5= "0.5"; // Les objets metiers ne sont plus corba, mais Java. public final static String FORMAT_VERSION_0_4= "0.4"; // Passage en Java 1.4 public final static String FORMAT_VERSION_0_3= "0.3"; @@ -344,6 +345,15 @@ etude.versionFormat(FORMAT_VERSION); } } + + // Version 0.5 + else if (FORMAT_VERSION_0_5.compareTo(_version)==0){ + System.out.println("=> Conversion format "+_version); + fluxLu.setHandler(new DeserializerHandlerVersion05(true)); + Object[] infos=(Object[])fluxLu.read(); + etude=(MetierEtude1d)infos[1]; + etude.versionFormat(FORMAT_VERSION); + } if(etude==null) return etude; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierProfil.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierProfil.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierProfil.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -33,6 +33,7 @@ indiceLitMajDr(q.indiceLitMajDr()); indiceLitMajGa(q.indiceLitMajGa()); avecGeoreferencement(q.avecGeoreferencement()); + infosGeoReferencement(q.infosGeoReferencement()); } } final public MetierHydraulique1d creeClone() { @@ -50,6 +51,7 @@ p.indiceLitMinDr(indiceLitMinDr_); p.indiceLitMajDr(indiceLitMajDr_); p.avecGeoreferencement(avecGeoreferencement_); + p.infosGeoReferencement(infosGeoReferencement_); return p; } final public String toString() { @@ -69,6 +71,7 @@ indiceLitMajDr_= 0; indiceLitMajGa_= 0; avecGeoreferencement_=false; + infosGeoReferencement_=""; notifieObjetCree(); } public void dispose() { @@ -80,6 +83,7 @@ indiceLitMajDr_= -1; indiceLitMajGa_= -1; avecGeoreferencement_=false; + infosGeoReferencement_=""; super.dispose(); } // attributs @@ -110,6 +114,7 @@ abscisse_= s; Notifieur.getNotifieur().fireObjetModifie(toString(), this, "abscisse"); } + private boolean avecGeoreferencement_; public boolean avecGeoreferencement() { return avecGeoreferencement_; @@ -119,6 +124,16 @@ avecGeoreferencement_= b; Notifieur.getNotifieur().fireObjetModifie(toString(), this, "avecGeoreferencement"); } + + private String infosGeoReferencement_; + public String infosGeoReferencement() { + return infosGeoReferencement_; + } + public void infosGeoReferencement(String s) { + if (infosGeoReferencement_==s) return; + infosGeoReferencement_= s; + Notifieur.getNotifieur().fireObjetModifie(toString(), this, "infosGeoReferencement"); + } private MetierPoint2D[] points_; public MetierPoint2D[] points() { return points_; @@ -398,7 +413,7 @@ if (p2.length != length) return false; for (int i=0; i<length; i++) - if (!((p[i].x==p2[i].x)&&(p[i].y==p2[i].y))) + if (!((p[i].x==p2[i].x)&&(p[i].y==p2[i].y) &&(p[i].cx==p2[i].cx)&&(p[i].cy==p2[i].cy))) return false; return true; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DCalculMascaret.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DCalculMascaret.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DCalculMascaret.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -380,7 +380,7 @@ DParametresMascaret.ecritParametresCAS(ficCAS, params.parametresCAS()); setProgression("Ecriture des fichiers param\xE8tres", 55); if (bInterrompu_) return; - DParametresMascaret.ecritParametresGEO(ficGEO, params.parametresGEO()); + DParametresMascaret.ecritParametresGEO(ficGEO, params.parametresGEO(),false); setProgression("Ecriture des fichiers des lois hydrauliques", 70); if (bInterrompu_) return; DParametresMascaret.ecritLoisHydrauliques(path + nomEtude, true, params.loisHydrauliques()); Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -1292,16 +1292,19 @@ SParametresProfil profil, String nomBief, int indBief, - int indProfil) + int indProfil, + boolean ecrireGeoReferencement) throws IOException { String nomProfil= profil.nom; if (nomProfil == null) nomProfil= "prof" + (indBief + 1) + "_" + (indProfil + 1); else if (nomProfil.equals("")) nomProfil= "prof" + (indBief + 1) + "_" + (indProfil + 1); - fgeo.writeln("PROFIL " + nomBief + " " + nomProfil + " " + profil.absc); - if (profil.avecGeoReferencement){ - System.err.println("avec georef"); + if (profil.infoGeoReferencement!=null && !profil.infoGeoReferencement.equals("")) + fgeo.writeln("PROFIL " + nomBief + " " + nomProfil + " " + profil.absc+" "+profil.infoGeoReferencement); + else + fgeo.writeln("PROFIL " + nomBief + " " + nomProfil + " " + profil.absc); + if (ecrireGeoReferencement && profil.avecGeoReferencement){ for (int i= 0; i < profil.pts.length; i++) { fgeo.writeln( profil.pts[i].x + " " + profil.pts[i].y + " " + profil.pts[i].lit+ " " + profil.pts[i].cx+ " " + profil.pts[i].cy); @@ -1318,7 +1321,8 @@ private final static void ecritParametresBief( FortranWriter fgeo, SParametresBief bief, - int indBief) + int indBief, + boolean ecrireGeoReferencement) throws IOException { String nomBief= bief.nom; if (nomBief == null) @@ -1326,7 +1330,7 @@ else if (nomBief.equals("")) nomBief= "bief" + (indBief + 1); for (int i= 0; i < bief.profils.length; i++) { - ecritParametresProfil(fgeo, bief.profils[i], nomBief, indBief, i); + ecritParametresProfil(fgeo, bief.profils[i], nomBief, indBief, i,ecrireGeoReferencement); } } @@ -1464,7 +1468,8 @@ } private static SParametresProfil mascaretEnteteProfil(String line) throws NoSuchElementException, NumberFormatException { - StringTokenizer st=new StringTokenizer(line); + System.err.println("hjohkh"); + StringTokenizer st=new StringTokenizer(line); SParametresProfil res=null; /* String motCle = */ st.nextToken(); @@ -1475,7 +1480,18 @@ res=new SParametresProfil(); res.nom=nomProfil; res.absc=abscisse; - return res; + + String infoGeoRef =""; + try{ + while (st.hasMoreTokens()){ //boucle de lecture + infoGeoRef = infoGeoRef + " " +st.nextToken(); + } + }catch (NoSuchElementException e){ + }finally{ + //System.err.println(" infoGeoRef"+infoGeoRef); + res.infoGeoReferencement=infoGeoRef; + return res; + } } private static boolean mascaretPointProfil(String line, Vector ptsProfil) throws NoSuchElementException, NumberFormatException { @@ -1495,7 +1511,6 @@ }catch(NoSuchElementException e){avecGeoReferencement=false;} if (avecGeoReferencement){ - System.err.println("georef found "+ cx +" "+cy); pt=new SParametresPt(x,y,cx,cy,lit); }else{ pt=new SParametresPt(x,y,0,0,lit); @@ -1511,12 +1526,13 @@ public final static void ecritParametresGEO( File fichier, - SParametresGEO params) { + SParametresGEO params, + boolean ecrireGeoReferencement) { try { FortranWriter fgeo= new FortranWriter(new FileWriter(fichier)); System.out.println("Creation du fichier " + fichier.getName()); for (int i= 0; i < params.biefs.length; i++) { - ecritParametresBief(fgeo, params.biefs[i], i); + ecritParametresBief(fgeo, params.biefs[i], i,ecrireGeoReferencement); } fgeo.close(); } catch (Exception ex) { Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/MascaretClient.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/MascaretClient.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/MascaretClient.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -275,8 +275,8 @@ pts[1].y = 10; pts[2].y = 10; pts[3].y = 20; - parametresGEO.biefs[0].profils[0] = new SParametresProfil("AMONT_BIEF", 0, pts,false); - parametresGEO.biefs[0].profils[1] = new SParametresProfil("AVAL_BIEF", 18000, pts,false); + parametresGEO.biefs[0].profils[0] = new SParametresProfil("AMONT_BIEF", 0, pts,false,""); + parametresGEO.biefs[0].profils[1] = new SParametresProfil("AVAL_BIEF", 18000, pts,false,""); return parametresGEO; } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dExport.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dExport.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dExport.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -8,12 +8,16 @@ */ package org.fudaa.fudaa.hydraulique1d; import java.io.File; +import java.io.FileWriter; import java.io.IOException; import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; import org.fudaa.ctulu.gui.CtuluFileChooser; +import org.fudaa.dodico.corba.mascaret.SParametresBief; +import org.fudaa.dodico.corba.mascaret.SParametresGEO; +import org.fudaa.dodico.fortran.FortranWriter; import org.fudaa.dodico.hydraulique1d.metier.MetierBief; import org.fudaa.dodico.hydraulique1d.metier.MetierCasier; import org.fudaa.dodico.hydraulique1d.metier.MetierEtude1d; @@ -43,8 +47,11 @@ MetierBief[] biefs) { DParametresMascaret.ecritParametresGEO( filename, - ConvH1D_Masc.convertirParametresGeo(biefs)); + ConvH1D_Masc.convertirParametresGeo(biefs),true); } + + + public static final void exportGeometrie_CASIER( File filename, MetierCasier[] casiers) { @@ -57,6 +64,8 @@ ConvH1D_Masc.convertirParametresGeoCasiers(casiers)); } } + + public static final void exportReprise_MASCARET( File filename, MetierParametresReprise paramReprise) { Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -1505,14 +1505,25 @@ res= bief.creeProfil(); res.nom(nomProfil); res.abscisse(abscisse); - return res; + String infoGeoRef =""; + try{ + while (st.hasMoreTokens()){ //boucle de lecture + infoGeoRef = infoGeoRef + " " +st.nextToken(); + } + }catch (NoSuchElementException e){ + }finally{ + //System.err.println(" infoGeoRef"+infoGeoRef); + res.infosGeoReferencement(infoGeoRef); + return res; + } + + } private static boolean mascaretPointProfil( String logMsg, String line, Vector ptsProfil) throws NoSuchElementException, NumberFormatException { - System.err.println("in mascaretPointProfil"); MetierPoint2D pt2D; boolean avecGeoReferencement = false; @@ -1529,7 +1540,6 @@ }catch(NoSuchElementException e){avecGeoReferencement=false;} if (avecGeoReferencement){ - System.err.println("georef found "+ cx +" "+cy); pt2D=new MetierPoint2D(x,y,cx,cy); }else{ pt2D=new MetierPoint2D(x,y); @@ -1752,14 +1762,24 @@ res= new Hydraulique1dProfilModel(); res.nom(nomProfil); res.setAbscisse(abscisse); - return res; + + String infoGeoRef =""; + try{ + while (st.hasMoreTokens()){ //boucle de lecture + infoGeoRef = infoGeoRef + " " +st.nextToken(); + } + }catch (NoSuchElementException e){ + }finally{ + //System.err.println(" infoGeoRef"+infoGeoRef); + res.infoGeoreferencement(infoGeoRef); + return res; + } } private static boolean mascaretPointProfil( String logMsg, String line, ArrayList ptsProfil) throws NoSuchElementException, NumberFormatException { - System.err.println("in mascaretPointProfil"); MetierPoint2D pt2D; boolean avecGeoReferencement = false; @@ -1776,7 +1796,6 @@ }catch(NoSuchElementException e){avecGeoReferencement=false;} if (avecGeoReferencement){ - System.err.println("georef found "+ cx +" "+cy); pt2D=new MetierPoint2D(x,y,cx,cy); }else{ pt2D=new MetierPoint2D(x,y); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProfilModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProfilModel.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProfilModel.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -82,7 +82,7 @@ private HashSet hsellisteners_=new HashSet(); private boolean avecGeoreferencement_; - + private String infoGeoreferencement_; // constructeurs public Hydraulique1dProfilModel() { @@ -94,6 +94,7 @@ ptLitMajDr_ = null; ptLitMajGa_ = null; avecGeoreferencement_ = false; + infoGeoreferencement_=""; } public Hydraulique1dProfilModel(MetierProfil iprofil) { @@ -106,6 +107,7 @@ setIndiceLitMinDr(iprofil.indiceLitMinDr()); setIndiceLitMajDr(iprofil.indiceLitMajDr()); avecGeoreferencement_= iprofil.avecGeoreferencement(); + infoGeoreferencement_=iprofil.infosGeoReferencement(); } public Object clone() { @@ -123,6 +125,7 @@ clone.setIndiceLitMinDr(getIndiceLitMinDr()); clone.setIndiceLitMajDr(getIndiceLitMajDr()); clone.avecGeoreferencement(avecGeoreferencement_); + clone.infoGeoreferencement(infoGeoreferencement_); return clone; } @@ -131,6 +134,8 @@ if (o instanceof Hydraulique1dProfilModel) { Hydraulique1dProfilModel p = (Hydraulique1dProfilModel)o; if (abscisse_ != p.getAbscisse()) return false; + if (!avecGeoreferencement_==p.avecGeoreferencement()) return false; + if (!infoGeoreferencement_.equals(p.infoGeoreferencement())) return false; if (getIndiceLitMajDr() != p.getIndiceLitMajDr()) return false; if (getIndiceLitMajGa() != p.getIndiceLitMajGa()) return false; if (getIndiceLitMinDr() != p.getIndiceLitMinDr()) return false; @@ -141,6 +146,8 @@ else if (o instanceof MetierProfil) { MetierProfil p = (MetierProfil)o; if (abscisse_ != p.abscisse()) return false; + if (!avecGeoreferencement_==p.avecGeoreferencement()) return false; + if (!infoGeoreferencement_.equals(p.infosGeoReferencement())) return false; if (getIndiceLitMajDr() != p.indiceLitMajDr()) return false; if (getIndiceLitMajGa() != p.indiceLitMajGa()) return false; if (getIndiceLitMinDr() != p.indiceLitMinDr()) return false; @@ -191,6 +198,14 @@ avecGeoreferencement_= b; } + public String infoGeoreferencement() { + return infoGeoreferencement_; + } + + public void infoGeoreferencement(String s) { + infoGeoreferencement_ = s; + } + public String nom() { return nom_; } @@ -753,7 +768,7 @@ for (int i = 0; i < length; i++) { Hydraulique1dPoint p2 = (Hydraulique1dPoint)liste.get(i); - if (! ( (p[i].x == p2.x()) && (p[i].y == p2.y()))) { + if (! ( (p[i].x == p2.x()) && (p[i].y == p2.y())&& (p[i].cx == p2.Cx()) && (p[i].cy == p2.Cy()))) { return false; } } @@ -773,7 +788,7 @@ for (int i = 0; i < length; i++) { Hydraulique1dPoint p1 = (Hydraulique1dPoint)l1.get(i); Hydraulique1dPoint p2 = (Hydraulique1dPoint)l2.get(i); - if (! ( (p1.x() == p2.x()) && (p1.y() == p2.y()))) { + if (! ( (p1.x() == p2.x()) && (p1.y() == p2.y()) && (p1.Cx() == p2.Cx()) && (p1.Cy() == p2.Cy()))) { return false; } } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProjet.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProjet.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProjet.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -150,7 +150,16 @@ // Etude entry=zf.getEntry("etude1d.xml"); - ietude1d_=ietude1d_.readFrom(zf.getInputStream(entry), false, MetierEtude1d.FORMAT_VERSION); + + //On recupere la version de l'etude + byte[] b = new byte[1000]; + zf.getInputStream(entry).read(b); + String DebutEtude = new String(b); + int indexVersion = DebutEtude.indexOf("<single type=\"String\">"); + String versionEtude=DebutEtude.substring(indexVersion+22,indexVersion+25); + + System.err.println("version de l'Etude lu "+versionEtude); + ietude1d_=ietude1d_.readFrom(zf.getInputStream(entry), false, versionEtude); // R\xE9seau entry=zf.getEntry("reseau.xml"); djaFrameReadFrom(zf.getInputStream(entry), FORMAT_DJA_VERSION); @@ -341,15 +350,28 @@ System.out.println("Lecture du fichier XML contenant l'\xE9tude : " + fichierEtude.getName()); MetierEtude1d etd=null; + FileInputStream in; // try{ // On teste en version 0.4 - FileInputStream in= new FileInputStream(fichierEtude); + in= new FileInputStream(fichierEtude); etd=ietude1d_.readFrom(in, false,MetierEtude1d.FORMAT_VERSION_0_4); in.close(); - // Si ca ne fonctionne pas, on teste en 0.5 + + // Si ca ne fonctionne pas, on teste les versions sup\xE9rieurs \xE0 0.5 if (etd==null) { + + //On recupere la version de l'etude + in= new FileInputStream(fichierEtude); + byte[] b = new byte[1000]; + in.read(b); + String DebutEtude = new String(b); + int indexVersion = DebutEtude.indexOf("<single type=\"String\">"); + String versionEtude=DebutEtude.substring(indexVersion+22,indexVersion+25); + + + // On teste la version in= new FileInputStream(fichierEtude); - etd=ietude1d_.readFrom(in, false,MetierEtude1d.FORMAT_VERSION); + etd=ietude1d_.readFrom(in, false,versionEtude); in.close(); } ietude1d_=etd; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -2589,6 +2589,7 @@ geoMas.biefs[i].profils[j].nom = biefs[i].profils()[j].nom().trim().replace(' ', '_'); geoMas.biefs[i].profils[j].avecGeoReferencement = biefs[i].profils()[j].avecGeoreferencement(); + geoMas.biefs[i].profils[j].infoGeoReferencement = biefs[i].profils()[j].infosGeoReferencement(); geoMas.biefs[i].profils[j].pts = new SParametresPt[biefs[i].profils()[j].points().length]; for (int k = 0; k < biefs[i].profils()[j].points().length; k++) { @@ -2599,7 +2600,7 @@ biefs[i].profils()[j].points()[k].y; geoMas.biefs[i].profils[j].pts[k].cx = biefs[i].profils()[j].points()[k].cx; - geoMas.biefs[i].profils[j].pts[k].cx = + geoMas.biefs[i].profils[j].pts[k].cy = biefs[i].profils()[j].points()[k].cy; if ( (biefs[i].profils()[j].indiceLitMinGa() <= k) && (k <= biefs[i].profils()[j].indiceLitMinDr())) { Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -438,6 +438,7 @@ biefs[i].profils()[j].abscisse(_params.biefs[i].profils[j].absc); biefs[i].profils()[j].nom(_params.biefs[i].profils[j].nom); biefs[i].profils()[j].avecGeoreferencement(_params.biefs[i].profils[j].avecGeoReferencement); + biefs[i].profils()[j].infosGeoReferencement(_params.biefs[i].profils[j].infoGeoReferencement); biefs[i].profils()[j].points(new MetierPoint2D[_params.biefs[i].profils[j].pts.length]); int indMinGa=_params.biefs[i].profils[j].pts.length; int indMinDr=0; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dBiefEditor.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dBiefEditor.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dBiefEditor.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -130,7 +130,7 @@ modele_.setValeurs(); } public boolean getValeurs() { - return modele_.getValeurs(); + return modele_.getValeurs(); } /** Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierGeometriePanel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierGeometriePanel.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierGeometriePanel.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -184,8 +184,11 @@ 0)); } protected void importer() { - File fichier= - Hydraulique1dImport.chooseFile("geo", "Fichier geom\xE9trie du casier"); + + String[] extensionGeometrie = {"casier","geo"}; + String[] descriptionGeometrie = {"Fichier geom\xE9trie du casier","Fichier geom\xE9trie du casier"}; + File fichier=Hydraulique1dImport.chooseFile(extensionGeometrie,descriptionGeometrie); + if (fichier != null) { try { MetierGeometrieCasier[] tabGeo= Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneProfilTableau.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneProfilTableau.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneProfilTableau.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -59,7 +59,23 @@ return super.chaine(); } + /** + * Retourne avecGeoReferencement. + * @return boolean + */ + public boolean avecGeoReferencement() { + return profilModel_.avecGeoreferencement(); + } + + /** + * Retourne infoGeoreferencement. + * @return String + */ + public String infoGeoreferencement() { + return profilModel_.infoGeoreferencement(); + } + /** * Initialise le premier \xE9lement de la ligne. * @param chaine La nouvelle valeur enti\xE8re de la ligne (peut \xEAtre nulle). */ @@ -104,6 +120,7 @@ else if (obj instanceof MetierProfil) { MetierProfil iprofil = (MetierProfil)obj; if (iprofil.abscisse() != abscisse()) return false; + if (iprofil.avecGeoreferencement() != avecGeoReferencement()) return false; if ((iprofil.nom() == null)&&(nom()!=null)) return false; if ((iprofil.nom() != null)&&(nom()==null)) return false; if (!iprofil.nom().equals(nom())) return false; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauProfilsModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauProfilsModel.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauProfilsModel.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -125,6 +125,7 @@ if (existeDifference) { miseAJourModeleMetier(profilsTmp); } + return existeDifference; } @@ -195,6 +196,8 @@ protected void initDProfil(Hydraulique1dLigneProfilTableau profilTab, MetierProfil iprofil) { iprofil.abscisse(profilTab.abscisse()); iprofil.nom(profilTab.nom()); + iprofil.avecGeoreferencement(profilTab.avecGeoReferencement()); + iprofil.infosGeoReferencement(profilTab.infoGeoreferencement()); if (profilTab.profilModel() != null) { iprofil.points(profilTab.profilModel().pointsNonNuls()); iprofil.indiceLitMajGa(profilTab.profilModel().getIndiceLitMajGa()); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java 2008-08-08 13:04:01 UTC (rev 3740) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java 2008-08-08 15:17:33 UTC (rev 3741) @@ -1273,8 +1273,10 @@ .activate(); return; } - File fichier= - Hydraulique1dImport.chooseFile("geo", "Fichier geom\xE9trie des casiers"); + String[] extensionGeometrie = {"casier","geo"}; + String[] descriptionGeometrie = {"Fichier geom\xE9trie des casiers","Fichier geom\xE9trie des casiers"}; + File fichier=Hydraulique1dImport.chooseFile(extensionGeometrie,descriptionGeometrie); + if (fichier != null) { MetierGeometrieCasier[] tabGeo= Hydraulique1dImport.geometrieCasier(fichier, false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <opa...@us...> - 2008-08-08 20:01:48
|
Revision: 3745 http://fudaa.svn.sourceforge.net/fudaa/?rev=3745&view=rev Author: opasteur Date: 2008-08-08 20:01:53 +0000 (Fri, 08 Aug 2008) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierBief.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierReseau.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierZonePlanimetrage.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dPlanimetrageEditor.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierBief.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierBief.java 2008-08-08 16:25:05 UTC (rev 3744) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierBief.java 2008-08-08 20:01:53 UTC (rev 3745) @@ -757,24 +757,28 @@ return false; } public int getNbPasPlanimetrage() { - int nbPas= 0; - org.omg.CORBA.DoubleHolder coteMin= new org.omg.CORBA.DoubleHolder(); - org.omg.CORBA.DoubleHolder coteMax= new org.omg.CORBA.DoubleHolder(); - for (int i= 0; i < zonesPlanimetrage_.length; i++) { - double pas= zonesPlanimetrage_[i].taillePas(); - int indDebut= - getIndiceProfilAbscisse(zonesPlanimetrage_[i].abscisseDebut()); - int indFin= getIndiceProfilAbscisse(zonesPlanimetrage_[i].abscisseFin()); - if (indDebut < 0) indDebut = -indDebut; - if (indFin < 0) indFin = -indFin; - for (int j= indDebut; j <= indFin; j++) { - profils_[j].coteMinMax(coteMin, coteMax); - double h= coteMax.value - coteMin.value; - nbPas= Math.max((int) (h / pas) + 1, nbPas); - } - } - return nbPas; + return getNbPasPlanimetrage(zonesPlanimetrage_); } + + public int getNbPasPlanimetrage(MetierZonePlanimetrage[] zonesPlanimetrage) { + int nbPas= 0; + org.omg.CORBA.DoubleHolder coteMin= new org.omg.CORBA.DoubleHolder(); + org.omg.CORBA.DoubleHolder coteMax= new org.omg.CORBA.DoubleHolder(); + for (int i= 0; i < zonesPlanimetrage.length; i++) { + double pas= zonesPlanimetrage[i].taillePas(); + int indDebut= + getIndiceProfilAbscisse(zonesPlanimetrage[i].abscisseDebut()); + int indFin= getIndiceProfilAbscisse(zonesPlanimetrage[i].abscisseFin()); + if (indDebut < 0) indDebut = -indDebut; + if (indFin < 0) indFin = -indFin; + for (int j= indDebut; j <= indFin; j++) { + profils_[j].coteMinMax(coteMin, coteMax); + double h= coteMax.value - coteMin.value; + nbPas= Math.max((int) (h / pas) + 1, nbPas); + } + } + return nbPas; + } public double interpoleFond(double abscisse) { double res= Double.POSITIVE_INFINITY; MetierProfil p1= null; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierReseau.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierReseau.java 2008-08-08 16:25:05 UTC (rev 3744) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierReseau.java 2008-08-08 20:01:53 UTC (rev 3745) @@ -1053,6 +1053,13 @@ } return Math.min(nbPas, 250); } + public int getNbPasPlanimetrage(MetierZonePlanimetrage[] zonesPlanimetrage) { + int nbPas= 0; + for (int i= 0; i < biefs_.length; i++) { + nbPas= Math.max(nbPas, biefs_[i].getNbPasPlanimetrage(zonesPlanimetrage)); + } + return Math.min(nbPas, 250); + } public MetierSingularite[] getSingularitesHorsBief() { MetierSingularite[] sings= singularites(); Vector resV= new Vector(); Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierZonePlanimetrage.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierZonePlanimetrage.java 2008-08-08 16:25:05 UTC (rev 3744) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierZonePlanimetrage.java 2008-08-08 20:01:53 UTC (rev 3745) @@ -52,4 +52,8 @@ taillePas_= t; Notifieur.getNotifieur().fireObjetModifie(toString(), this, "taillePas"); } + + /*public String toString(){ + return "MetierZonePlanimetrage bief="+this.biefRattache().numero()+" abs debut "+this.abscisseDebut()+" abs fin "+this.abscisseFin()+" taille pas "+this.taillePas(); + }*/ } Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java 2008-08-08 16:25:05 UTC (rev 3744) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java 2008-08-08 20:01:53 UTC (rev 3745) @@ -1504,11 +1504,13 @@ String lit= st.nextToken(); double cx = 0; double cy = 0; - try{ - cx = Double.parseDouble(st.nextToken()); - cy = Double.parseDouble(st.nextToken()); - avecGeoReferencement=true; - }catch(NoSuchElementException e){avecGeoReferencement=false;} + if (st.hasMoreTokens()){ + try{ + cx = Double.parseDouble(st.nextToken()); + cy = Double.parseDouble(st.nextToken()); + avecGeoReferencement=true; + }catch(NoSuchElementException e){avecGeoReferencement=false;} + } if (avecGeoReferencement){ pt=new SParametresPt(x,y,cx,cy,lit); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java 2008-08-08 16:25:05 UTC (rev 3744) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java 2008-08-08 20:01:53 UTC (rev 3745) @@ -1533,12 +1533,13 @@ String lit= st.nextToken(); double cx = 0; double cy = 0; - try{ - cx = Double.parseDouble(st.nextToken()); - cy = Double.parseDouble(st.nextToken()); - avecGeoReferencement=true; - }catch(NoSuchElementException e){avecGeoReferencement=false;} - + if (st.hasMoreTokens()){ + try{ + cx = Double.parseDouble(st.nextToken()); + cy = Double.parseDouble(st.nextToken()); + avecGeoReferencement=true; + }catch(NoSuchElementException e){avecGeoReferencement=false;} + } if (avecGeoReferencement){ pt2D=new MetierPoint2D(x,y,cx,cy); }else{ @@ -1789,12 +1790,13 @@ String lit= st.nextToken(); double cx = 0; double cy = 0; - try{ - cx = Double.parseDouble(st.nextToken()); - cy = Double.parseDouble(st.nextToken()); - avecGeoReferencement=true; - }catch(NoSuchElementException e){avecGeoReferencement=false;} - + if (st.hasMoreTokens()){ + try{ + cx = Double.parseDouble(st.nextToken()); + cy = Double.parseDouble(st.nextToken()); + avecGeoReferencement=true; + }catch(NoSuchElementException e){avecGeoReferencement=false;} + } if (avecGeoReferencement){ pt2D=new MetierPoint2D(x,y,cx,cy); }else{ Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dPlanimetrageEditor.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dPlanimetrageEditor.java 2008-08-08 16:25:05 UTC (rev 3744) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dPlanimetrageEditor.java 2008-08-08 20:01:53 UTC (rev 3745) @@ -9,6 +9,9 @@ package org.fudaa.fudaa.hydraulique1d.editor; import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d; import org.fudaa.dodico.hydraulique1d.metier.MetierReseau; +import org.fudaa.dodico.hydraulique1d.metier.MetierZonePlanimetrage; +import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dLigneReelTableau; +import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dLigneZoneTableau; import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dTableauZoneTailleModel; import com.memoire.bu.BuTextField; @@ -17,7 +20,10 @@ import com.memoire.bu.BuHorizontalLayout; import com.memoire.bu.BuPanel; import com.memoire.bu.BuCheckBox; + import java.awt.event.*; +import java.util.Iterator; +import java.util.List; /** * Editeur des zones de planim\xE9trages (MetierZonePlanimetrage).<br> * Appeler si l'utilisateur clic sur le menu "Mascaret/Planim\xE9trage".<br> @@ -95,7 +101,32 @@ } private void estimationPasPlanim() { - tfNbPasPlanim_.setValue(new Integer(reseau_.getNbPasPlanimetrage())); + List lstPoints = modele_.getListePtsComplets(); + + //ON doit construire metierZonePlanimetrages car celui de l'objet m\xE9tier n'est pas \xE0 jour + MetierZonePlanimetrage[] metierZonePlanimetrages = new MetierZonePlanimetrage[lstPoints.size()]; + int i = 0; + for (Iterator iter = lstPoints.iterator(); iter.hasNext();) { + + Hydraulique1dLigneZoneTableau element = (Hydraulique1dLigneZoneTableau) iter.next(); + metierZonePlanimetrages[i]=new MetierZonePlanimetrage(); + metierZonePlanimetrages[i].biefRattache(reseau_.getBiefNumero(element.iBief())); + metierZonePlanimetrages[i].abscisseDebut(element.abscDebut()); + metierZonePlanimetrages[i].abscisseFin(element.abscFin()); + metierZonePlanimetrages[i].taillePas(element.getValue(2).doubleValue()); + + + System.err.println(reseau_.getBiefNumero(element.iBief())); + System.err.println(element.abscDebut()); + System.err.println(element.abscFin()); + System.err.println(element.getValue(2).doubleValue()); + + i++; + } + System.err.println(); + int res = reseau_.getNbPasPlanimetrage(metierZonePlanimetrages); + tfNbPasPlanim_.setValue(new Integer(res)); + System.err.println("plani"+res); } private void enableTxtFieldButton() { Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java 2008-08-08 16:25:05 UTC (rev 3744) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java 2008-08-08 20:01:53 UTC (rev 3745) @@ -117,7 +117,6 @@ */ public boolean getValeurs() { trier(); - List listeTmp = getListeLignesCorrectes(); MetierZoneFrottement[] tabMetier = null; boolean existeDifference = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <opa...@us...> - 2008-08-12 12:12:50
|
Revision: 3778 http://fudaa.svn.sourceforge.net/fudaa/?rev=3778&view=rev Author: opasteur Date: 2008-08-12 12:12:59 +0000 (Tue, 12 Aug 2008) Log Message: ----------- Corresction du bug sur les donn?\195?\169es affich?\195?\169es lors de la selection de plusieurs casiers ou liaisons Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/PanneauGraphesResultats.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-08-12 10:56:13 UTC (rev 3777) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-08-12 12:12:59 UTC (rev 3778) @@ -661,8 +661,7 @@ } stemp = entite.isDefautValuesValides(); final String app = (String) mapEncours.get(kw_.getApparence()); - System.err.println("app "+app); - System.err.println("stemp "+stemp); + if (stemp != null && ((app == null) || (app.indexOf("IS REQUIRED") < 0))) { analyze_.addFatalError(getQuoteString() + noms[0] + "': " + DicoResource.getS("Les valeurs par d\xE9faut sont invalides"), ligne); @@ -670,6 +669,7 @@ return; } stemp = type.isChoicesValides(); + if (stemp != null) { analyze_.addFatalError(getQuoteString() + noms[0] + "': " + DicoResource.getS("Les valeurs CHOIX sont invalides"), ligne); Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java 2008-08-12 10:56:13 UTC (rev 3777) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java 2008-08-12 12:12:59 UTC (rev 3778) @@ -1468,7 +1468,6 @@ } private static SParametresProfil mascaretEnteteProfil(String line) throws NoSuchElementException, NumberFormatException { - System.err.println("hjohkh"); StringTokenizer st=new StringTokenizer(line); SParametresProfil res=null; /* String motCle = */ Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/PanneauGraphesResultats.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/PanneauGraphesResultats.java 2008-08-12 10:56:13 UTC (rev 3777) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/PanneauGraphesResultats.java 2008-08-12 12:12:59 UTC (rev 3778) @@ -689,11 +689,11 @@ for (int i= 0; i < nbPasTemps; i++) { int indiceCourbe= 1; - for (int n = 0; n < resCasiersLiasons.length; n++) { + for (int n = 0; n < resCasiersLiasons.length; n++) { for (int j= 0; j < indicesVar.length; j++) { vals= resCasiersLiasons[n].valeursVariables(); - res[indiceCourbe][i]= vals[indicesVar[j]-1][i][0]; + res[indiceCourbe][i]= vals[indicesVar[j]][i][0]; indiceCourbe++; } } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java 2008-08-12 10:56:13 UTC (rev 3777) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java 2008-08-12 12:12:59 UTC (rev 3778) @@ -1169,6 +1169,16 @@ fdico=new File(SERVEUR_MASCARET.getCheminNoyau(),"dico.txt"); } + if (!fdico.exists()) { + new BuDialogMessage( + (BuCommonInterface) Hydraulique1dBaseApplication.FRAME, + ((BuCommonInterface) Hydraulique1dBaseApplication.FRAME) + .getInformationsSoftware(), + "Le fichier dictionaire n'existe pas !") + .activate(); + return; + } + // Lecture du fichier Mascaret et transfert dans l'objet metier. Notifieur.getNotifieur().setEventMuet(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2008-08-27 07:03:31
|
Revision: 3844 http://fudaa.svn.sourceforge.net/fudaa/?rev=3844&view=rev Author: fargeix Date: 2008-08-27 07:03:37 +0000 (Wed, 27 Aug 2008) Log Message: ----------- Modifications diverses du code Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrListeNavires.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DataSimulation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiDeterministe.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiJournaliere.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Implementation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefAvalant.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefMontant.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Modeletrajets.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelGestionTrajetsBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglesCroisementBief.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglestrematageBief.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelSaisieBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelSaisieEcluse.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonGenerationBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatGenerationBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatHistorique.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsDureesParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3VisualiserBateaux.java Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -1,5 +1,5 @@ /** - * @file DCalculSipor.java + * @file DCalculSinavi3.java * @creation 1999-09-17 * @modification $Date: 2007-11-23 11:31:40 $ * @license GNU General Public License 2 @@ -12,9 +12,12 @@ import org.fudaa.dodico.calcul.DCalcul; import org.fudaa.dodico.corba.objet.IConnexion; import org.fudaa.dodico.corba.sinavi3.ICalculSinavi3; +import org.fudaa.dodico.corba.sinavi3.ICalculSinavi3Helper; import org.fudaa.dodico.corba.sinavi3.ICalculSinavi3Operations; +import org.fudaa.dodico.corba.sinavi3.IParametresSinavi3; +import org.fudaa.dodico.corba.sinavi3.IParametresSinavi3Helper; import org.fudaa.dodico.corba.sinavi3.SParametresSinavi32; -import org.fudaa.dodico.corba.sipor.*; +//import org.fudaa.dodico.corba.sipor.*; import org.fudaa.dodico.objet.CDodico; import org.fudaa.dodico.objet.CExec; /** @@ -24,16 +27,17 @@ public class DCalculSinavi3 extends DCalcul implements ICalculSinavi3,ICalculSinavi3Operations { public DCalculSinavi3() { super(); - setFichiersExtensions(new String[] { ".dat", ".out", ".tmp", ".sip", }); + setFichiersExtensions(new String[] { ".nom", ".nav", ".bie", ".ouv", ".cnx", ".vites", ".trajet",".croist", ".tremat",".man",".gen",".his"}); + //setFichiersExtensions(new String[] { ".dat", ".out", ".tmp", ".sip", }); } public final Object clone() throws CloneNotSupportedException{ return new DCalculSinavi3(); } public String toString() { - return "DCalculSipor()"; + return "DCalculSinavi3()"; } public String description() { - return "Sipor, serveur de calcul pour le trafic d'un port" + return "Sinavi, serveur de calcul pour le trafic fluvial" + super.description(); } public void calcul(final IConnexion c) { @@ -42,7 +46,7 @@ return; }*/ - final IParametresSipor params= IParametresSiporHelper.narrow(parametres(c)); + final IParametresSinavi3 params= IParametresSinavi3Helper.narrow(parametres(c)); if (params == null) { CDodico.exceptionAxel(this, new Exception("params non definis (null)")); } @@ -56,7 +60,7 @@ log(c, "lancement du calcul"); final String os= System.getProperty("os.name"); final String path= cheminServeur(); - final String fichier= "sipor" + c.numero(); + final String fichier= "sinavi3" + c.numero(); try { Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -297,6 +297,7 @@ f.stringField(0, new Float(ec.listeEcluses[i].profondeur).toString()); f.stringField(2, "profondeur de l'ecluse" + (i + 1)); f.writeFields(fmt); + f.stringField(0, new Float(ec.listeEcluses[i].hauteurChute).toString()); f.stringField(2, "hauteur de chute de l'ecluse" + (i + 1)); f.writeFields(fmt); Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -18,7 +18,7 @@ /** * Permet d'acc\xE9der aux r\xE9sultats d'une simulation. * - * @version $Revision: 1.3 $ $Date: 2008-01-25 14:02:01 $ by $Author: hadouxad $ + * @version $Revision: 1.4 $ $Date: 2008-08-13 11:00:00 $ by $Author: fargeix $ * @author Nicolas Chevalier */ public class DResultatsSinavi3 @@ -121,7 +121,7 @@ donneesNavire.tableauTrajet[i]=new Sinavi3ResultatsDonneeTrajet(); //donnees associ\xE9es \xE0 un \xE9l\xE9ment String typeElement=fr.stringField(0); - if(typeElement.equals("B") ||typeElement.equals("b")) + if(typeElement.equals("T") ||typeElement.equals("t")) donneesNavire.tableauTrajet[i].typeElement=0; else donneesNavire.tableauTrajet[i].typeElement=1; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrListeNavires.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrListeNavires.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrListeNavires.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -80,7 +80,7 @@ File fichier=new File(nomFichier); if(!fichier.exists()){ - new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Le fichier "+nomFichier+"\n de g\xE9n\xE9ration est introuvable.\n Veuillez relancer la g\xE9n\xE9ration de navire (onglet G\xE9n\xE9ration)").activate(); + new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Le fichier "+nomFichier+"\n de g\xE9n\xE9ration est introuvable.\nLa g\xE9n\xE9ration de bateaux peut \xEAtre lanc\xE9e \xE0 nouveau via la menu \"G\xE9n\xE9ration\".").activate(); return false; } @@ -129,7 +129,7 @@ catch (FileNotFoundException e1) { } catch (final Exception ex) { CDodico.exception(DResultatsSipor.class, ex); - new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Erreur dans la lecture du fichier de navires g\xE9n\xE9r\xE9s (genarr.x)").activate(); + new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Erreur dans la lecture du fichier de bateaux g\xE9n\xE9r\xE9s (genarr.x).").activate(); return false; } @@ -176,7 +176,7 @@ catch (FileNotFoundException e1) { } catch (final Exception ex) { CDodico.exception(DResultatsSipor.class, ex); - new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Erreur dans la lecture du fichier de navires g\xE9n\xE9r\xE9s (genarr.x)").activate(); + new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Erreur dans la lecture du fichier de bateaux g\xE9n\xE9r\xE9s (genarr.x).").activate(); } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -58,7 +58,7 @@ if(columnIndex==0 ) return ""+((CoupleLoiDeterministe) this.loiDeterministe_.get(rowIndex)).jour_; - return ""+(int) ((CoupleLoiDeterministe) this.loiDeterministe_.get(rowIndex)).temps_; + return ""+ ((CoupleLoiDeterministe) this.loiDeterministe_.get(rowIndex)).temps_; } @@ -79,19 +79,20 @@ public void setValueAt(Object aValue, int rowIndex, int columnIndex) { - float temps=-1; + if(aValue=="") {loiDeterministe_.remove(this.loiDeterministe_.get(rowIndex)); this.fireTableStructureChanged(); return;} + double temps=-1; int jour=-1; try { if(columnIndex==0) jour=Integer.parseInt((String)aValue); else - temps=Integer.parseInt( (String)aValue); + temps=Double.parseDouble((String)aValue); } catch (NumberFormatException e) { new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "La saisie n'est pas un nombre entier").activate(); + "La saisie n'est pas correcte.").activate(); return; } @@ -101,7 +102,7 @@ if(temps>24 || temps<0){ new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "L'horaire doit \xEAtre compris entre 0 et 24h").activate(); + "L'horaire doit \xEAtre compris entre 0 et 24 heures.").activate(); return; } @@ -112,7 +113,7 @@ String unite=contenu.substring(contenu.lastIndexOf(".")+1, contenu.length()); if(unite.length()>2){ new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "Il doit y avoir 2 chiffres maximum apr\xE8s la virgule").activate(); + "Il doit y avoir deux chiffres au maximum apr\xE8s la virgule.").activate(); return; } @@ -133,7 +134,7 @@ if(jour>donnees_.params_.donneesGenerales.nombreJours) { new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "Le jour doit \xEAtre inf\xE9rieur au nombre \n de jours apr\xE8s la simulation").activate(); + "Le jour doit \xEAtre inf\xE9rieur au nombre \nde jours apr\xE8s la simulation.").activate(); return; } else @@ -185,7 +186,6 @@ //mise a joru du contenu de la cellule this.fireTableCellUpdated(rowIndex, columnIndex); - } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DataSimulation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DataSimulation.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DataSimulation.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -409,7 +409,7 @@ // fred il y a erreur projet_ = null; new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), - "Ce fichier ne contient pas de donn\xE9es sinavi valides!").activate(); + "Ce fichier ne contient pas de donn\xE9es Sinavi valides.").activate(); } // fred donc si projet_ ==null on arrete @@ -535,7 +535,7 @@ } catch (final java.lang.ClassCastException c) { new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), - "Ce fichier ne contient pas de donn\xE9es sinavi valides!").activate(); + "Ce fichier ne contient pas de donn\xE9es Sinavi valides.").activate(); } @@ -548,7 +548,7 @@ if (this.params_ == null) { new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), - "Ce fichier ne contient pas de parametre").activate(); + "Ce fichier ne contient aucun param\xE8tre.").activate(); initParams(); return; } @@ -559,7 +559,7 @@ getParametresProjet(); new BuDialogMessage(this.application_.getApp(), this.application_.getInformationsSoftware(), "Simulation: " - + projet_.getFichier() + "\n\nParam\xE8tres charg\xE9s avec succ\xE8s").activate(); + + projet_.getFichier() + "\nParam\xE8tres charg\xE9s avec succ\xE8s.").activate(); } @@ -1377,8 +1377,8 @@ final JPanel panelMessage = new JPanel(); final JScrollPane asc = new JScrollPane(panelMessage); final JPanel controlPanel = new JPanel(); - final BuButton validation = new BuButton(FudaaResource.FUDAA.getIcon("crystal_oui"), "validation"); - final BuButton quitter = new BuButton(FudaaResource.FUDAA.getIcon("crystal_quitter"), "quitter"); + final BuButton validation = new BuButton(FudaaResource.FUDAA.getIcon("crystal_oui"), "Valider"); + final BuButton quitter = new BuButton(FudaaResource.FUDAA.getIcon("crystal_quitter"), "Quitter"); /* final Sinavi3InternalFrame */frameVerif_ = new Sinavi3InternalFrame("", true, true, true, true); @@ -1413,7 +1413,7 @@ frameVerif_.getContentPane().add(controlPanel, BorderLayout.SOUTH); // bouton ne devient accessible que si la totalit\xE9 des test ont \xE9t\xE9 r\xE9alis\xE9\xE9 avec succ\xE8s validation.setEnabled(false); - frameVerif_.setTitle("Verifications avant lancement simulation"); + frameVerif_.setTitle("V\xE9rification des donn\xE9es de simulation"); frameVerif_.setSize(650, 500); frameVerif_.setVisible(true); @@ -1424,35 +1424,35 @@ tableauVerif[0].setForeground(Color.BLUE); String font = getDefaultFontName(); if (this.listeGare_.listeGares_.size() >= 2) { - tableauVerif[0].setText("test 1 reussi: Nombre de gares superieur a 2"); + tableauVerif[0].setText("Test 1... REUSSITE: nombre de gares sup\xE9rieur \xE0 2"); } else { tableauVerif[0].setFont(new Font(font, Font.ITALIC, 13)); tableauVerif[0].setForeground(Color.RED); - tableauVerif[0].setText("test 1 echoue: Nombre de gares superieur a 2"); + tableauVerif[0].setText("Test 1... ECHEC: nombre de gares inf\xE9rieur \xE0 2"); new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), - "Erreur! Il faut au moins 2 gares...").activate(); + "Erreur! Il faut au moins 2 gares.").activate(); return false; } tableauVerif[1].setForeground(Color.BLUE); if (this.listeBief_.listeBiefs_.size() >= 1) { - tableauVerif[1].setText("test 2 reussi: au moins un bief existant"); + tableauVerif[1].setText("Test 2... REUSSITE: au moins un bief a \xE9t\xE9 d\xE9fini"); } else { tableauVerif[1].setFont(new Font(font, Font.ITALIC, 13)); tableauVerif[1].setForeground(Color.RED); - tableauVerif[1].setText("test 2 echoue: Nombre insuffisant de biefs"); + tableauVerif[1].setText("Test 2... ECHEC: aucun bief n'a \xE9t\xE9 d\xE9fini"); new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), - "Erreur! Il faut au moins un bief").activate(); + "Erreur! Il faut au moins un bief.").activate(); return false; } tableauVerif[2].setForeground(Color.BLUE); if (this.listeEcluse_.listeEcluses_.size() >= 1) { - tableauVerif[2].setText("test 3: Au moins une ecluse existante"); + tableauVerif[2].setText("Test 3... REUSSITE: au moins une \xE9cluse a \xE9t\xE9 d\xE9finie"); } else { tableauVerif[2].setFont(new Font(font, Font.ITALIC, 13)); tableauVerif[2].setForeground(Color.RED); - tableauVerif[2].setText("test 3: Aucune ecluses"); + tableauVerif[2].setText("Test 3... AVERTISSEMENT: aucune \xE9cluse n'a \xE9t\xE9 d\xE9finie"); } @@ -1460,11 +1460,11 @@ tableauVerif[3].setForeground(Color.BLUE); if (this.listeBateaux_.listeNavires_.size() >= 1) { - tableauVerif[3].setText("test 4 reussi: au moins une cat\xE9gorie de bateau existant"); + tableauVerif[3].setText("Test 4... REUSSITE: au moins une cat\xE9gorie de bateaux a \xE9t\xE9 d\xE9finie"); } else { tableauVerif[3].setFont(new Font(font, Font.ITALIC, 13)); tableauVerif[3].setForeground(Color.RED); - tableauVerif[3].setText("test 4 echoue: Nombre insuffisant de categories de bateaux"); + tableauVerif[3].setText("Test 4... ECHEC: aucune cat\xE9gorie de bateaux n'a \xE9t\xE9 d\xE9finie"); new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), "Erreur! Il faut au moins une categorie de bateau").activate(); return false; @@ -1472,19 +1472,19 @@ tableauVerif[4].setForeground(Color.BLUE); int h=listeBateaux_.existeTrajetPourChaqueNavires(); if(h!=-1){ - new BuDialogError(this.application_.getApp(),application_.isSinavi_,"Il n'existe pas de trajet pour \n" +listeBateaux_.retournerNavire(h).nom+ - ".\n Pour saisir un trajet, aller dans l'onglet Navigations, rubrique trajet").activate(); + new BuDialogError(this.application_.getApp(),application_.isSinavi_,"Aucun trajet n'a \xE9t\xE9 d\xE9fini pour la cat\xE9gorie\n" +listeBateaux_.retournerNavire(h).nom+ + ".\nUn trajet peut \xEAtre d\xE9fini via le menu \"Navigation\"").activate(); tableauVerif[4].setFont(new Font(font, Font.ITALIC, 13)); tableauVerif[4].setForeground(Color.RED); - tableauVerif[4].setText("test 5 avertissement: Il n'existe pas au moins un trajet par cat\xE9gorie de bateau"); + tableauVerif[4].setText("Test 5... AVERTISSEMENT: aucun trajet n'a \xE9t\xE9 d\xE9fini pour certaines cat\xE9gories de bateaux"); //return false; } else - tableauVerif[4].setText("test 5 reussi: au moins un trajet existe par cat\xE9gorie de bateau"); + tableauVerif[4].setText("Test 5... REUSSITE: au moins un trajet par cat\xE9gorie de bateaux a \xE9t\xE9 d\xE9fini"); int compteur = 5; // test 2: verification des gares orphelines tableauVerif[compteur].setForeground(Color.BLACK); - tableauVerif[compteur++].setText("test 6: Signalement des gares orphelines"); + tableauVerif[compteur++].setText("Test 6: Signalement des gares orphelines..."); tableauVerif[compteur].setForeground(Color.BLUE); compteur = suppressionGaresOrphelines(tableauVerif, compteur); @@ -1493,26 +1493,26 @@ if (!verifVitesseAvalantChenal()) { tableauVerif[compteur].setFont(new Font(font, Font.ITALIC, 13)); tableauVerif[compteur].setForeground(Color.RED); - tableauVerif[compteur++].setText("test 7 WARNING: Les vitesses avalant bief nulles"); + tableauVerif[compteur++].setText("Test 7... AVERTISSEMENT: Certaines vitesses avalantes dans les biefs sont nulles"); new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), - "WARNING:\n Les vitesses avalant biefs " + "\n Onglet navigation/ Vitesses " - + "\n - Il y a des valeurs non saisies (par exemple 0) ").activate(); + "Attention! Certaines vitesses avalantes dans les biefs sont nulles." + "\nElles peuvent \xEAtre red\xE9finies via le menu \"Navigation\"." + ).activate(); } else { - tableauVerif[compteur++].setText("test 7 reussi: Les vitesses avalant bief valides"); + tableauVerif[compteur++].setText("Test 7... REUSSITE: Les vitesses avalantes dans les biefs sont valides"); } tableauVerif[compteur].setForeground(Color.BLUE); if (!verifVitesseMontantChenal()) { tableauVerif[compteur].setFont(new Font(font, Font.ITALIC, 13)); tableauVerif[compteur].setForeground(Color.RED); - tableauVerif[compteur++].setText("test 8 WARNING: Les vitesses montant bief nulles"); + tableauVerif[compteur++].setText("Test 8... AVERTISSEMENT: Certaines vitesses montantes dans les biefs sont nulles"); new BuDialogError(this.application_.getApp(), this.application_.getInformationsSoftware(), - "WARNING:\n Les vitesses biefs " + "\n Onglet navigation/ Vitesses " - + "\n - Il y a des valeurs non saisies (par exemple 0) ").activate(); + "Attention! Certaines vitesses avalantes dans les biefs sont nulles." + "\nElles peuvent \xEAtre red\xE9finies via le menu \"Navigation\"." + ).activate(); } else { - tableauVerif[compteur++].setText("test 8 reussi: Les vitesses montant bief valides"); + tableauVerif[compteur++].setText("Test 8... REUSSITE: Les vitesses montantes dans les biefs sont valides"); } tableauVerif[compteur].setForeground(Color.BLUE); @@ -1521,30 +1521,30 @@ // test 5: passage navires ecluses tableauVerif[compteur].setForeground(Color.BLACK); - tableauVerif[compteur++].setText("test 9:Signalement des largeurs cat\xE9gories et ecluses"); + tableauVerif[compteur++].setText("Test 9: Signalement des largeurs de bateaux incompatibles avec les dimensions des \xE9cluses..."); tableauVerif[compteur].setForeground(Color.BLUE); int anciencpt = compteur; compteur = verifPassageEcluse(tableauVerif, compteur); if (anciencpt != compteur) { } else { - tableauVerif[compteur++].setText("test 9 reussi: toutes les cat\xE9gories passent les ecluses!"); + tableauVerif[compteur++].setText("Test 9... REUSSITE: toutes les largeurs de bateaux sont compatibles avec les dimensions des \xE9cluses"); } tableauVerif[compteur].setForeground(Color.BLACK); - tableauVerif[compteur++].setText("test 10:Signalement des longueurs cat\xE9gories et ecluses"); + tableauVerif[compteur++].setText("Test 10: Signalement des longueurs de bateaux incompatibles avec les dimensions des \xE9cluses..."); tableauVerif[compteur].setForeground(Color.BLUE); anciencpt = compteur; compteur = verifPassageEcluseLongueur(tableauVerif, compteur); if (anciencpt != compteur) { } else { - tableauVerif[compteur++].setText("test 10 reussi: toutes les cat\xE9gories sont moins longues que les \xE9cluses!"); + tableauVerif[compteur++].setText("Test 10... REUSSITE: toutes les longueurs de bateaux sont compatibles avec les dimensions des \xE9cluses!"); } tableauVerif[compteur].setForeground(Color.BLACK); tableauVerif[compteur++] - .setText("test 11: Signalement tirant d'eau entree des cat\xE9gories par rapport \xE0 la profondeur des chenaux sans mar\xE9es"); + .setText("Test 11: Signalement des tirants d'eau des bateaux incompatibles avec la profondeur des biefs..."); tableauVerif[compteur].setForeground(Color.BLUE); int previousCpt = compteur; compteur = verifPassageChenaux(tableauVerif, compteur); @@ -1553,7 +1553,7 @@ } else { tableauVerif[compteur++] - .setText("test 11 reussi:tirant d'eau entree: toutes les cat\xE9gories passent les chenaux!"); + .setText("Test 11... REUSSITE: tous les tirants d'eau des bateaux sont compatibles avec la profondeur des biefs"); } @@ -1561,15 +1561,15 @@ File fichier=new File(this.projet_.getFichier()+".arriv"); if(!fichier.exists()){ - new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Le fichier de g\xE9n\xE9ration est introuvable.\n Veuillez relancer la g\xE9n\xE9ration de navire (onglet G\xE9n\xE9ration)").activate(); + new BuDialogError(null,Sinavi3Implementation.isSinavi_,"Le fichier de g\xE9n\xE9ration est introuvable.\nLa g\xE9n\xE9ration des bateaux peut \xEAtre relanc\xE9e via le menu \"G\xE9n\xE9ration\".").activate(); tableauVerif[compteur].setForeground(Color.RED); tableauVerif[compteur].setFont(new Font(font, Font.ITALIC, 13)); - tableauVerif[compteur++].setText("test 13 echoue: Le fichier de g\xE9n\xE9ration des navires est introuvable."); + tableauVerif[compteur++].setText("Test 13... ECHEC: Le fichier de g\xE9n\xE9ration des bateaux est introuvable"); return false; } tableauVerif[compteur].setForeground(Color.BLUE); - tableauVerif[compteur++].setText("test 13 reussi: Le fichier de g\xE9n\xE9ration des navires existe."); + tableauVerif[compteur++].setText("Test 13... REUSSITE: Le fichier de g\xE9n\xE9ration des bateaux existe"); @@ -1578,7 +1578,7 @@ new BuDialogMessage(this.application_.getApp(), this.application_.getInformationsSoftware(), - "La simulation peut etre lancee, les donnees verifiees!").activate(); + "Les donn\xE9es ont \xE9t\xE9 v\xE9rifi\xE9es.\nLa simulation peut maintenant \xEAtre d\xE9marr\xE9e.").activate(); // tous les test ont ete effectuees, le lancement de la simulation peut avoir lieu // bouton de validation devient accessible: ce bouton declenche l'onglet simulation validation.setEnabled(true); @@ -1608,7 +1608,7 @@ _t[cpt].setFont(new Font(getDefaultFontName(), Font.ITALIC, 13)); _t[cpt++] .setText(getStringCategorie() + this.listeBateaux_.retournerNavire(l).nom - + " a un tirant d'eau en entr\xE9e sup\xE9rieur \xE0 celui du chenal " + + " a un tirant d'eau incompatible avec les dimensions du bief " + this.listeBief_.retournerBief(k).nom_); } @@ -1652,7 +1652,7 @@ _t[cpt].setFont(new Font(getDefaultFontName(), Font.ITALIC, 13)); _t[cpt++].setText(getStringCategorie() + this.listeBateaux_.retournerNavire(l).nom - + " ne passe pas l'ecluse " + this.listeEcluse_.retournerEcluse(k).nom_); + + " a une largeur incompatible avec les dimensions de l'\xE9cluse " + this.listeEcluse_.retournerEcluse(k).nom_); } @@ -1752,13 +1752,14 @@ _t[cpt].setForeground(Color.RED); _t[cpt].setFont(new Font(getDefaultFontName(), Font.ITALIC, 13)); _t[cpt++].setText("la gare " + this.listeGare_.retournerGare(i) + " est une gare orpheline"); + String nomgare=this.listeGare_.retournerGare(i); final int reponse = new BuDialogConfirmation(this.application_.getApp(), this.application_ - .getInformationsSoftware(), "Voulez vous supprimer la gare orpheline " + this.listeGare_.retournerGare(i) + .getInformationsSoftware(), "Voulez vous supprimer la gare orpheline " + nomgare + "?").activate(); if (reponse == 0) { this.listeGare_.suppression(i); new BuDialogMessage(this.application_.getApp(), this.application_.getInformationsSoftware(), - "la gare orpheline " + this.listeGare_.retournerGare(i) + "a ete supprimee avec succes!").activate(); + "La gare orpheline " + nomgare + " a \xE9t\xE9 supprim\xE9e avec succ\xE8s.").activate(); i--; } @@ -1858,17 +1859,17 @@ final int[] fmt = new int[] { 40, 1, 100 }; // ecriture du nombre de cat\xE9gories f.stringField(0, new Integer(c.nombresTrajetsTotal()).toString()); - f.stringField(2, "Nombre de trajets totaux toutes categories"); + f.stringField(2, "nombre de trajets totaux toutes categories"); f.writeFields(fmt); for (int i = 0; i < c.listeNavires_.size(); i++) { //-- recuperation du bateau --// Sinavi3Bateau bateau=c.retournerNavire(i); f.stringField(0, bateau.nom); - f.stringField(2, "Nom du bateau"); + f.stringField(2, "nom du bateau"); f.writeFields(fmt); f.stringField(0, new Integer(bateau.listeTrajet_.size()).toString()); - f.stringField(2, "Nombre de trajet du bateau "+bateau.nom); + f.stringField(2, "nombre de trajet du bateau "+bateau.nom); f.writeFields(fmt); @@ -1918,13 +1919,13 @@ if(trajet.typeLoiGenerationNavires_==1) { f.stringField(0, new Integer(trajet.loiDeterministeOUjournaliere_.size()).toString()); - f.stringField(2, "Nombre de couple deterministe"); + f.stringField(2, "nombre de couples deterministes"); f.writeFields(fmt); //-- loi deterministe --// for(int h=0;h<trajet.loiDeterministeOUjournaliere_.size();h++) { f.stringField(0, new Integer(((CoupleLoiDeterministe)trajet.loiDeterministeOUjournaliere_.get(h)).jour_).toString()+" "+new Double(((CoupleLoiDeterministe)trajet.loiDeterministeOUjournaliere_.get(h)).temps_).toString()); - f.stringField(2, "couple loi deterministe "+h); + f.stringField(2, "couple loi deterministe "+(h+1)); f.writeFields(fmt); } @@ -1935,13 +1936,13 @@ else { f.stringField(0, new Integer(trajet.loiDeterministeOUjournaliere_.size()).toString()); - f.stringField(2, "Nombre de couple journaliers"); + f.stringField(2, "nombre d'horaires journaliers"); f.writeFields(fmt); //-- loi deterministe --// for(int h=0;h<trajet.loiDeterministeOUjournaliere_.size();h++) { f.stringField(0, new Double( ((CoupleLoiDeterministe)trajet.loiDeterministeOUjournaliere_.get(h)).temps_).toString()); - f.stringField(2, "couple loi deterministe "+h); + f.stringField(2, "horaire journalier "+(h+1)); f.writeFields(fmt); } @@ -1987,11 +1988,10 @@ public void moulinetteRecuperationSinavi2(){ final int confirmation = new BuDialogConfirmation(application_.getApp(), - Sinavi3Implementation.isSinavi_, "Vous etes sur le point de charger un ancien fichier sinavi \n(fichier .nom)" + - ". Cette action ecrasera l'ancien projet existant." + - "\n Etes vous sur de vouloir continuer? " + - "\n (les lois de generation des trajets, bief et ecluses ne pourront pas etre r\xE9cup\xE9r\xE9s)" + - "\n Etes vous sur de vouloir continuer?").activate(); + Sinavi3Implementation.isSinavi_, "Vous \xEAtes sur le point de charger un ancien fichier sinavi\n(fichier .nom)" + + ". Cette action \xE9crasera l'ancien projet existant." + + "\nLes lois de g\xE9n\xE9ration des trajets, biefs et \xE9cluses ne pourront pas \xEAtre r\xE9cup\xE9r\xE9s." + + "\nVoulez-vous vraiment continuer ?").activate(); if (confirmation == 0) { Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiDeterministe.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiDeterministe.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiDeterministe.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -59,7 +59,8 @@ /** * Bouton de validation des donn�es topolgiques saisies pour le chenal */ - JButton validation = new JButton("valider"); + JButton validation = new JButton("Valider"); + JButton suppression = new JButton("Supprimer"); /** * Fenetre qui contiendra le panel @@ -129,13 +130,32 @@ } }); + + + //ajout par fargeix + + this.suppression.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent e) { + final int numLigne = tableau.getSelectedRow(); + if (numLigne == -1) {} + else { + for (int i=numLigne; i<299; i++) + { + tableau.getModel().setValueAt(tableau.getModel().getValueAt(i+1, 0), i, 0); + tableau.getModel().setValueAt(tableau.getModel().getValueAt(i+1, 1), i, 1); + } + } + }}); + + //fin ajout par fargeix + /** * Creation de la fenetre */ - setTitle("saisie de la loi deterministe"); - setSize(200, 300); + setTitle("Loi d\xE9terministe"); + setSize(250, 300); setBorder(BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(), BorderFactory.createLoweredBevelBorder())); getContentPane().setLayout(new BorderLayout()); @@ -147,6 +167,7 @@ final JPanel controlPanel = new JPanel(); controlPanel.add(validation); + controlPanel.add(suppression); getContentPane().add(controlPanel, BorderLayout.SOUTH); // affichage de la frame @@ -232,7 +253,7 @@ + i + " est superieur au nombre total \nde jours de simulation " + donnees_.params_.donneesGenerales.nombreJours - + "!!!!\n vous pouvez modifier le nombre de jours de la simulation \n en allant dans l'onglet donn\xE9es g\xE9n\xE9rales \nfermezcette fenetre et ouvrez la pour mettre a jour les donn\xE9es") + + "!!!!\n vous pouvez modifier le nombre de jours de la simulation \nen allant dans l'onglet donn\xE9es g\xE9n\xE9rales \nFermez cette fenetre et ouvrez la pour mettre a jour les donn\xE9es") .activate(); return false; } else if (nh > 24) { @@ -260,7 +281,7 @@ }// if les mots sont non vides else { new BuDialogMessage(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "les donn\xE9es ont \xE9t\xE9 correctement saisies: " + i + " couples saisis!! ").activate(); + "Les donn\xE9es ont \xE9t\xE9 correctement saisies: " + i + " couples enregistr\xE9s.").activate(); dispose(); return true; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiJournaliere.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiJournaliere.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiJournaliere.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -27,6 +27,7 @@ import javax.swing.JTable; import javax.swing.border.Border; +import com.memoire.bu.BuDialogConfirmation; import com.memoire.bu.BuDialogError; import com.memoire.bu.BuDialogMessage; @@ -57,7 +58,8 @@ /** * Bouton de validation des donn�es topolgiques saisies pour le chenal */ - JButton validation = new JButton("valider"); + JButton validation = new JButton("Valider"); + JButton suppression = new JButton("Supprimer"); /** * Fenetre qui contiendra le panel @@ -113,13 +115,29 @@ } }); + + //ajout par fargeix + + this.suppression.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent e) { + final int numLigne = tableau.getSelectedRow(); + if (numLigne == -1) {} + else { + for (int i=numLigne; i<299; i++) + { tableau.getModel().setValueAt(tableau.getModel().getValueAt(i+1, 0), i, 0); } + } + }}); + + //fin ajout par fargeix + + /** * Creation de la fenetre */ - setTitle("saisie de la loi journaliere"); - setSize(200, 300); + setTitle("Loi journali\xE8re"); + setSize(250, 300); setBorder(BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(), BorderFactory.createLoweredBevelBorder())); getContentPane().setLayout(new BorderLayout()); @@ -130,6 +148,7 @@ final JPanel controlPanel = new JPanel(); controlPanel.add(validation); + controlPanel.add(suppression); getContentPane().add(controlPanel, BorderLayout.SOUTH); // affichage de la frame @@ -204,17 +223,34 @@ if (!horaire.equals("")) { // test si le nombre entr\xE9e est bien un nombre r\xE9el: try { - final float nh = Float.parseFloat(horaire); - if (nh < 0) { - new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, "Erreur!! l'horaire ligne " - + i + " est negatif!!!!").activate(); - return false; - } else if (nh > 24) { - // le nombre est positif et inferieur a 24 - new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, "Erreur!! l'horaire ligne " - + i + " est invalide: superieur a 24!!!!").activate(); - return false; - } else { + //-- TEST FORMATTAGE HORAIRE --// + if(horaire.lastIndexOf(".")!=-1){ + String unite=horaire.substring(horaire.lastIndexOf(".")+1, horaire.length()); + if(unite.length()>2){ + new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, + "Il doit y avoir deux chiffres au maximum apr\xE8s la virgule.").activate(); + return false; + } + float valUnite=Float.parseFloat(unite); + if(valUnite>=60){ + new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, + "Les unit\xE9s doivent \xEAtre inf\xE9rieures \xE0 60 minutes.").activate(); + return false; + } + } + // fin test formattage horaire + + final double nh = Double.parseDouble(horaire); + if (nh < 0) { + new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, "L'horaire ligne " + + i + " doit \xEAtre compris entre 0 et 24 heures").activate(); + return false; + } else if (nh > 24) { + // le nombre est positif et inferieur a 24 + new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, "L'horaire ligne " + + i + " doit \xEAtre compris entre 0 et 24 heures.").activate(); + return false; + } else { // on ajoute al donn\xE9e au vecteur ou on modifie selon le cas if (i >= this.loiJournaliere_.size()) { this.loiJournaliere_.add(new CoupleLoiDeterministe(1, nh)); @@ -232,7 +268,7 @@ }// if les mots sont non vides else { new BuDialogMessage(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "les horaires ont \xE9t\xE9 correctement saisies: \n" + i + " horaires saisis!! ").activate(); + "Les horaires ont \xE9t\xE9 correctement saisis: " + i + " horaires enregistr\xE9s.").activate(); dispose(); if (this.composant_ != null) { Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Implementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Implementation.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Implementation.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -1568,8 +1568,8 @@ this.donnees_.params_.ResultatsCompletsSimulation = new SParametresResultatsCompletSimulation(); - fenetreProgression.miseAjourBarreProgression(70, "exploitation des g\xE9n\xE9rations de navires."); - mp.setMessage("exploitation des g\xE9n\xE9rations de navires."); + fenetreProgression.miseAjourBarreProgression(70, "exploitation de la g\xE9n\xE9ration des bateaux."); + mp.setMessage("exploitation de la g\xE9n\xE9ration des bateaux."); mp.setProgression(70); // Etape 1: calcul des generations de navires: Sinavi3AlgorithmeGenerationBateaux.calcul(donnees_); @@ -2419,7 +2419,7 @@ catch (final Exception ex) { System.out.println("Erreur lors de l'execution du code de calcul"); if(progFortran==0) - new BuDialogMessage(this.getApp(),isSinavi_,"Impossible d'executer le g\xE9n\xE9rateur de navire genarr").activate(); + new BuDialogMessage(this.getApp(),isSinavi_,"Impossible d'executer le g\xE9n\xE9rateur de bateaux Genarr").activate(); else new BuDialogMessage(this.getApp(),isSinavi_,"Impossible d'executer le noyau de calcul Sinavi").activate(); return false; @@ -2487,12 +2487,12 @@ if(!result) return; - new BuDialogMessage(this.getApp(),isSinavi_,"La g\xE9n\xE9ration de navires a \xE9t\xE9 r\xE9alis\xE9 avec succ\xE8s.").activate(); + new BuDialogMessage(this.getApp(),isSinavi_,"La g\xE9n\xE9ration de bateaux a \xE9t\xE9 r\xE9alis\xE9 avec succ\xE8s.").activate(); } catch (IOException e) { - new BuDialogError(this.getApp(),isSinavi_,"Erreur dans la cr\xE9ation du fichier des cat\xE9gories de navire.\n" + - "v\xE9rifier la saisie des cat\xE9gories de navires.").activate(); + new BuDialogError(this.getApp(),isSinavi_,"Erreur dans la cr\xE9ation du fichier des cat\xE9gories de bateaux.\n" + + "V\xE9rifier la saisie des cat\xE9gories de bateaux.").activate(); } } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefAvalant.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefAvalant.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefAvalant.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -68,9 +68,9 @@ //-- Gestion des erreurs --// if(valeur < 0) { new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "Erreur!! la valeur entre:\n le chenal: " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ - + "\n et \n le navire: " + this.donnees_.listeBateaux_.retournerNavire(columnIndex-1).nom - + "\nest negatif!!!!").activate(); + "La valeur entre\nle bief " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ + + "\net le bateau " + this.donnees_.listeBateaux_.retournerNavire(columnIndex-1).nom + + "\nest n\xE9gative.").activate(); return; } @@ -81,8 +81,8 @@ if(minutes/100!=0) { new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "La valeur entre:\n le chenal: " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ - + "\n et le navire: " + this.donnees_.listeBateaux_.retournerNavire(columnIndex-1).nom + "La valeur entre\nle bief " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ + + "\net le bateau " + this.donnees_.listeBateaux_.retournerNavire(columnIndex-1).nom + " n'est pas coh\xE9rente: \n2 chiffres apr\xE8s la virgule maximum sont attendus.").activate(); return; @@ -92,9 +92,9 @@ } catch (NumberFormatException e) { new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "La valeur entre:\n le chenal: " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ - + "\n et \n le navire: " + this.donnees_.listeBateaux_.retournerNavire(columnIndex-1).nom - + "\n n'est pas coh\xE9rente: ce n'est pas un reel!!!").activate(); + "La valeur entre\nle bief " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ + + "\n et \n le bateau " + this.donnees_.listeBateaux_.retournerNavire(columnIndex-1).nom + + "\n n'est pas coh\xE9rente: ce n'est pas un r\xE9el.").activate(); return; } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefMontant.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefMontant.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefMontant.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -68,9 +68,9 @@ //-- Gestion des erreurs --// if(valeur < 0) { new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "Erreur!! la valeur entre:\n le bief: " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ - + "\n et \n le navire: " + this.donnees_.listeBateaux_.retournerNavire(columnIndex).nom - + "\nest negatif!!!!").activate(); + "La valeur entre\nle bief " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ + + "\net le bateau " + this.donnees_.listeBateaux_.retournerNavire(columnIndex).nom + + "\nest negative.").activate(); return; } @@ -81,8 +81,8 @@ if(minutes/100!=0) { new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "La valeur entre:\n le bief: " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ - + "\n et le navire: " + this.donnees_.listeBateaux_.retournerNavire(columnIndex).nom + "La valeur entre\n le bief " + this.donnees_.listeBief_.retournerBief(rowIndex).nom_ + + "\n et le bateau " + this.donnees_.listeBateaux_.retournerNavire(columnIndex).nom + " n'est pas coh\xE9rente: \n2 chiffres apr\xE8s la virgule maximum sont attendus.").activate(); return; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Modeletrajets.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Modeletrajets.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Modeletrajets.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -19,7 +19,7 @@ private int compteurTotal=0; Object[][] data=null; //-- le contenu des colonnes du modele du tableau --// - private String[] titreColonnes_={"Bateaux","gare d\xE9part","gare arriv\xE9e","sens","type de loi","ordre de la loi","horaire erlang","Nb navires attendus"}; + private String[] titreColonnes_={"Cat\xE9gorie","Gare de d\xE9part","Gare d'arriv\xE9e","Sens","Type de loi","Ordre de la loi","Horaire Erlang","Nb. bateaux attendus"}; public Sinavi3Modeletrajets(Sinavi3DataSimulation _d){ Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelGestionTrajetsBateaux.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelGestionTrajetsBateaux.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelGestionTrajetsBateaux.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -73,11 +73,11 @@ //--SplitPane qui contient les 2 panels formulaires et affichage --// BuPanel conteneur=new BuPanel(new GridLayout(2,1)); - private final BuButton impression_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_generer"), "Excel"); - private final BuButton modification_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_maj"), "modif"); - private final BuButton quitter_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_oui"), "quitter"); - private final BuButton suppression_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_detruire"), "suppr"); - private final BuButton boutonSaisie_ = new BuButton(FudaaResource.FUDAA.getIcon("ajouter"), "ajout"); + private final BuButton impression_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_generer"), "Exporter"); + private final BuButton modification_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_maj"), "Modifier"); + private final BuButton quitter_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_oui"), "Quitter"); + private final BuButton suppression_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_detruire"), "Supprimer"); + private final BuButton boutonSaisie_ = new BuButton(FudaaResource.FUDAA.getIcon("ajouter"), "Ajouter"); /** Composants du formulaire**/ /**Trajet du bateau**/ @@ -87,19 +87,20 @@ Sinavi3FrameSaisieLoiDeterministe fenetreLoideter_ = null; JComboBox dgGareDepart = new JComboBox(); JComboBox dgGareArrivee = new JComboBox(); - JComboBox dgSens = new JComboBox(new String[]{"Avalant","Montant" }); + JComboBox dgSens = new JComboBox(new String[]{"avalant","montant" }); String[] choixLoi_ = { "Erlang", "Deterministe", "Journaliere" }; JComboBox choixLoiGenerationNav_ = new JComboBox(choixLoi_); // loi erlang + final BuButton configurationLoi_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_maj"), "Configurer"); Sinavi3TextFieldInteger nbBateauxAttendus_ = new Sinavi3TextFieldInteger(3); Sinavi3TextFieldDuree erlangdebut=new Sinavi3TextFieldDuree(3); Sinavi3TextFieldDuree erlangfin=new Sinavi3TextFieldDuree(3); String[] tabloi_ = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; JComboBox loiGenerationNavErlang_ = new JComboBox(tabloi_); ArrayList loiDeterministe_ = new ArrayList(); - JLabel messNbaviresAttendus = new JLabel("Nb bateaux attendus sur la duree de la simulation:"); - final BuButton validerNavire_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_oui"), "ajout"); + JLabel messNbaviresAttendus = new JLabel("Nombre de bateaux attendus sur la dur\xE9e de la simulation:"); + final BuButton validerNavire_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_oui"), "Ajouter"); @@ -111,21 +112,21 @@ modeleTrajet=new Sinavi3Modeletrajets(donnees_); //-- infos de l'interface--// - setTitle("gestion des trajets"); - this.dgGareDepart.setToolTipText("Veuillez choisir la gare de d\xE9part du bateau"); - erlangdebut.setToolTipText("Veuillez rentrer l'heure de d\xE9but de la g\xE9n\xE9ration d'erlang"); - erlangfin.setToolTipText("Veuillez rentrer l'heure de fin de la g\xE9n\xE9ration d'erlang"); - this.dgGareArrivee.setToolTipText("Veuillez choisir la gare d'arriv\xE9e du bateau"); - this.dgSens.setToolTipText("Veuillez sp\xE9cifier le sens du trajet du bateau"); - choixLoiGenerationNav_.setToolTipText("veuillez choisir le type deloi de generation de bateaux "); + setTitle("D\xE9finition des trajets"); + this.dgGareDepart.setToolTipText("Gare de d\xE9part des bateaux"); + erlangdebut.setToolTipText("Heure de d\xE9but de la g\xE9n\xE9ration d'Erlang"); + erlangfin.setToolTipText("Heure de fin de la g\xE9n\xE9ration d'Erlang"); + this.dgGareArrivee.setToolTipText("Gare d'arriv\xE9e des bateaux"); + this.dgSens.setToolTipText("Sens du trajet du bateau"); + choixLoiGenerationNav_.setToolTipText("Choix du type de loi de g\xE9n\xE9ration de bateaux"); this.modification_ - .setToolTipText("permet de modifier un \xE9l\xE9ment: il faut dabord cliquer sur l'\xE9l\xE9ment \xE0 modifier dans le tableau"); - this.quitter_.setToolTipText("cliquez sur ce bouton pour fermer la sous fen\xEAtre"); + .setToolTipText("Modifie le trajet s\xE9lectionn\xE9 dans le tableau ci-dessus"); + this.quitter_.setToolTipText("Ferme la sous-fen\xEAtre"); this.suppression_ - .setToolTipText("permet de supprimer une donn\xE9e: cliquez d'abord sur l'\xE9l\xE9ment \xE0 supprimer dans le menu tableau"); + .setToolTipText("Supprime le trajet s\xE9lectionn\xE9 dans le tableau ci-dessus"); this.impression_ - .setToolTipText("permet d'importer le contenu des donn\xE9es dans un fichier excel que l'on pourra par la suite imprimer"); - boutonSaisie_.setToolTipText("permet d'ajouter un trajet"); + .setToolTipText("Exporte le contenu du tableau au format xls"); + boutonSaisie_.setToolTipText("Ajoute un nouveau trajet"); @@ -144,32 +145,34 @@ listeBateaux.setSelectedIndex(0); Box boxLargeurs2=Box.createVerticalBox(); - boxLargeurs2.setBorder(BorderFactory.createTitledBorder(Sinavi3Bordures.compound_, "saisir un trajet du bateau")); + boxLargeurs2.setBorder(BorderFactory.createTitledBorder(Sinavi3Bordures.compound_, "Trajet des bateaux")); panelFormulaire.add(boxLargeurs2); final JPanel pdg31a = new JPanel(); - pdg31a.add(new JLabel("Gare D\xE9part ")); + pdg31a.add(new JLabel("Gare de d\xE9part:")); pdg31a.add(this.dgGareDepart); - pdg31a.add(new JLabel("Arriv\xE9e: ")); + pdg31a.add(new JLabel(" Gare d'arriv\xE9e:")); pdg31a.add(this.dgGareArrivee); - pdg31a.add(new JLabel("Sens trajet: ")); + pdg31a.add(new JLabel(" Sens de parcours:")); pdg31a.add(this.dgSens); boxLargeurs2.add(pdg31a); // Loi generation de navires JPanel panelLoigeneration=new JPanel(new GridLayout(3,1)); - panelLoigeneration.setBorder(BorderFactory.createTitledBorder(Sinavi3Bordures.compound_, "Loi generation de bateaux")); + panelLoigeneration.setBorder(BorderFactory.createTitledBorder(Sinavi3Bordures.compound_, "Loi de g\xE9n\xE9ration des bateaux")); panelFormulaire.add(panelLoigeneration); final JPanel mscdtype3 = new JPanel(); - mscdtype3.add(new JLabel("type de loi:")); + mscdtype3.add(new JLabel("Type de loi:")); mscdtype3.add(this.choixLoiGenerationNav_); + mscdtype3.add(this.configurationLoi_); mscdtype3.add(new JLabel("Ordre loi d'Erlang:")); mscdtype3.add(this.loiGenerationNavErlang_); panelLoigeneration.add(mscdtype3); final JPanel mscdtype4 = new JPanel(); - messNbaviresAttendus = new JLabel("Nb Bateaux attendus sur la duree de la simulation:"); + messNbaviresAttendus = new JLabel("Nombre de bateaux attendus sur la dur\xE9e de la simulation:"); messNbaviresAttendus.setForeground(Color.RED); mscdtype4.add(messNbaviresAttendus); mscdtype4.add(this.nbBateauxAttendus_); panelLoigeneration.add(mscdtype4); + configurationLoi_.setEnabled(false); //-- ajout du bouton de validation --// BuPanel creneaux=new BuPanel(); @@ -177,7 +180,7 @@ creneaux.add(erlangdebut); creneaux.add(new JLabel("-")); creneaux.add(erlangfin); - creneaux.add(new JLabel("H.Min")); + creneaux.add(new JLabel("hrs.min")); creneaux.add(validerNavire_); panelLoigeneration.add(creneaux); @@ -195,9 +198,9 @@ //--panel affichage --// BuPanel selectionNavire=new BuPanel(new FlowLayout()); tableau_=new BuTable(modeleTrajet); - selectionNavire.add(new JLabel("Selectionnez la cat\xE9gorie de bateau pour saisir et afficher ses trajets:")); + selectionNavire.add(new JLabel("Cat\xE9gorie de bateaux:")); selectionNavire.add(listeBateaux); - selectionNavire.setBorder(BorderFactory.createTitledBorder("Choix du navire")); + selectionNavire.setBorder(BorderFactory.createTitledBorder("Choix de la cat\xE9gorie de bateaux")); panelAffichage.add(selectionNavire,BorderLayout.NORTH); panelAffichage.add(new JScrollPane(tableau_),BorderLayout.CENTER); @@ -209,6 +212,50 @@ public void actionPerformed(final ActionEvent e) { ajouterTrajet(); }}); + + //d\xE9but ajout par fargeix + + configurationLoi_.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent e) { + final int choixLoi = choixLoiGenerationNav_.getSelectedIndex(); + if (choixLoi == 1) { + if (fenetreLoideter_ == null) { + FuLog.debug("interface nulle"); + fenetreLoideter_ = new Sinavi3FrameSaisieLoiDeterministe(donnees_, loiDeterministe_, null); + fenetreLoideter_.setVisible(true); + donnees_.application_.addInternalFrame(fenetreLoideter_); + } else { + FuLog.debug("interface ferm\xE9e"); + if (fenetreLoideter_.isClosed()) { + donnees_.application_.addInternalFrame(fenetreLoideter_); + } else { + FuLog.debug("interface cas de figur restant autre que null et fermeture"); + donnees_.application_.activateInternalFrame(fenetreLoideter_); + donnees_.application_.addInternalFrame(fenetreLoideter_); + } + } + } + else if (choixLoi == 2) { + if (fenetreLoiJournaliere_ == null) { + FuLog.debug("interface nulle"); + fenetreLoiJournaliere_ = new Sinavi3FrameSaisieLoiJournaliere(donnees_, loiDeterministe_, null); + fenetreLoiJournaliere_.setVisible(true); + donnees_.application_.addInternalFrame(fenetreLoiJournaliere_); + } else { + FuLog.debug("interface ferm\xE9e"); + if (fenetreLoiJournaliere_.isClosed()) { + donnees_.application_.addInternalFrame(fenetreLoiJournaliere_); + } else { + FuLog.debug("interface cas de figur restant autre que null et fermeture"); + donnees_.application_.activateInternalFrame(fenetreLoiJournaliere_); + donnees_.application_.addInternalFrame(fenetreLoiJournaliere_); + } + } + } + } + }); + + //fin ajout par fargeix this.choixLoiGenerationNav_.addActionListener(new ActionListener() { @@ -224,6 +271,7 @@ erlangfin.setEnabled(true); // ecartMoyenEntre2Arrivees_.setEnabled(true); loiGenerationNavErlang_.setEnabled(true); + configurationLoi_.setEnabled(false); } else if (choixLoi == 1) { // cas 1: loi deterministe @@ -234,6 +282,7 @@ erlangfin.setEnabled(false); // ecartMoyenEntre2Arrivees_.setEnabled(false); loiGenerationNavErlang_.setEnabled(false); + configurationLoi_.setEnabled(true); if (fenetreLoideter_ == null) { FuLog.debug("interface nulle"); @@ -264,6 +313,7 @@ erlangfin.setEnabled(false); // ecartMoyenEntre2Arrivees_.setEnabled(false); loiGenerationNavErlang_.setEnabled(false); + configurationLoi_.setEnabled(true); if (fenetreLoiJournaliere_ == null) { FuLog.debug("interface nulle"); @@ -397,7 +447,7 @@ // on s occupe de la supresion des cat\xE9gories de navires: // 1)on demande confirmation: final int confirmation = new BuDialogConfirmation(donnees_.application_.getApp(), - Sinavi3Implementation.isSinavi_, "\xE9tes vous sur de supprimer le trajet ?").activate(); + Sinavi3Implementation.isSinavi_, "Etes-vous certain de vouloir supprimer le trajet ?").activate(); if (confirmation == 0) { // 2)on supprime le trajet correspondant a la suppression @@ -482,7 +532,7 @@ erlangfin.setEnabled(true); this.loiDeterministe_ = new ArrayList(); - validerNavire_.setText("ajouter"); + validerNavire_.setText("Ajouter"); MODIF_ON=false; @@ -530,7 +580,7 @@ } this.loiDeterministe_=trajet.loiDeterministeOUjournaliere_; - validerNavire_.setText("modifier"); + validerNavire_.setText("Modifier"); } @@ -539,7 +589,7 @@ if(nbBateauxAttendus_.getText().equals("") && choixLoiGenerationNav_.getSelectedIndex()==0) { new BuDialogError(donnees_.application_.getApp(), donnees_.application_.isSinavi_, - "donn\xE9e nombre de navires attendus manquante.").activate(); + "Le nombre de navires attendus est manquant.").activate(); return false; } if(erlangdebut.getText().equals("") && choixLoiGenerationNav_.getSelectedIndex()==0) Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglesCroisementBief.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglesCroisementBief.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglesCroisementBief.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -378,7 +378,7 @@ new BuDialogMessage( donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "Regles de navigation des cheneaux correctement saisies.\n Attention! un ajout de cat\xE9gorie de navire implique qu'\n une ligne et une colonne suppl\xE9mentaire\n a saisir apparaitrons ici.\n(par defaut les valeurs de cette ligne\n et colonne supplementaire sont a oui)") + "Les r\xE8gles de navigation des biefs sont correctement saisies.\nAttention! Un ajout de cat\xE9gorie de bateau implique qu'\nune ligne et une colonne suppl\xE9mentaires\n\xE0 saisir apparaitront ici.\n(par defaut la valeur des cases correspondantes\nest \"oui\").") .activate(); dispose(); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglestrematageBief.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglestrematageBief.java 2008-08-26 16:36:02 UTC (rev 3843) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglestrematageBief.java 2008-08-27 07:03:37 UTC (rev 3844) @@ -378,7 +378,7 @@ new BuDialogMessage( donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, - "Regles de navigation des cheneaux correctement saisies.\n Attention! un ajout de cat\xE9gorie de navire implique qu'\n une ligne et une colonne suppl\xE9mentai... [truncated message content] |
From: <bma...@us...> - 2008-08-31 13:22:21
|
Revision: 3855 http://fudaa.svn.sourceforge.net/fudaa/?rev=3855&view=rev Author: bmarchan Date: 2008-08-31 13:22:22 +0000 (Sun, 31 Aug 2008) Log Message: ----------- Probl?\195?\168me lors du merge depuis Br_FudaaModeleur_TR : Certains fichiers n'ont pas suivi. Remise dans leur forme originelle Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeDureesParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeTOUTESAttentesTrajet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeTOUTESDureesParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3GenereNoteHtml.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatGenerationBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteTrajet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3TraduitHoraires.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sipor/SiporTraduitHoraires.java trunk/fudaa_devel/fudaa-distrib/mascaret/izpack/shortcutSpec.xml Added Paths: ----------- trunk/fudaa_devel/fudaa-distrib/mascaret/icons/fudaamascaret24.ico Removed Paths: ------------- trunk/fudaa_devel/fudaa-distrib/mascaret/icons/fudaamascaret.ico Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java 2008-08-31 13:19:15 UTC (rev 3854) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java 2008-08-31 13:22:22 UTC (rev 3855) @@ -1,311 +1,206 @@ -/** - * @file DResultatsSinavi3.java - * @creation 1999-09-23 - * @modification $Date: 2007-11-23 11:31:39 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.dodico.sinavi3; -import java.io.*; -import java.util.*; -import java.util.Vector; -import org.fudaa.dodico.objet.*; -import org.fudaa.dodico.calcul.*; -import org.fudaa.dodico.fortran.FortranReader; -import org.fudaa.dodico.corba.sinavi3.*; -import com.memoire.fu.FuLog; -/** - * Permet d'acc\xE9der aux r\xE9sultats d'une simulation. - * - * @version $Revision: 1.1 $ $Date: 2007-11-23 11:31:39 $ by $Author: hadouxad $ - * @author Nicolas Chevalier - */ -public class DResultatsSinavi3 - extends DResultats - implements IResultatsSinavi3,IResultatsSinavi3Operations { - private String fichier_; - public DResultatsSinavi3() { - super(); - fichier_= ""; - } - public final Object clone() throws CloneNotSupportedException { - final DResultatsSinavi3 r= new DResultatsSinavi3(); - r.fichier(fichier_); - return r; - } - public String toString() { - return "DResultatsSinavi3(" + fichier_ + ")"; - } - public String fichier() { - return fichier_; - } - /** - * Mutateur de fihcier. Ajoute "_histo.dat" \xE0 _fichier. - * - * @param _fichier - */ - public void fichier(final String _fichier) { - fichier_= _fichier + /*"_histo.dat"*/".his"; - } - /** - * Pour acc\xE9der aux r\xE9sultats. - * - * @return r\xE9sultats - */ - public Sinavi3ResultatListeevenementsSimu litResultatsSinavi3() { - return litResultatsSinavi3(fichier()); - } - /** - * Lit un fichier de r\xE9sultats et renvoie une instance de SResultatsIterations - * correspondant aux donn\xE9es lues. - * - * @param nomFichier - * @return r\xE9sultats - */ - public static double arrondire2decimales(double val) - { - val=val*100; - val=(int)(val+0.5); - val=val/100.0; - return val; - } - - public static Sinavi3ResultatListeevenementsSimu litResultatsSinavi3(final String nomFichier) { - try { - FuLog.debug("Lecture de " + nomFichier); - - Sinavi3ResultatListeevenementsSimu listeResultats= new Sinavi3ResultatListeevenementsSimu(); - - //vecteur dynamique qui servira a stocker chaque navire en attendant de connaitrez le nombre exact de navires - ArrayList vecteurListe=new ArrayList(); - - //structure finale qui contiendra la totalit\xE9 des navires - FortranReader fr= new FortranReader(new FileReader(nomFichier)); - - try { - while (true) { - fr.readFields(); - - if (fr.getNumberOfFields() > 2) { - //recopiage des parametres dans le champs - - //allocation m\xE9moire pour les donn\xE9es d un anvire - Sinavi3ResultatsSimulation donneesNavire=new Sinavi3ResultatsSimulation(); - FuLog.debug("num cat: "+fr.intField(0)+"\n categorie: "+(fr.intField(1)-1)+"\n longueur: "+fr.doubleField(2)+"\n tonnage: "+fr.doubleField(3)+ "\n nb elements trajet: "+fr.intField(4)); - //recopiage des donn\xE9es du fichier dans la struture donneesNavire - donneesNavire.numero=fr.intField(0); - donneesNavire.categorie=fr.intField(1)-1; - donneesNavire.longueur=fr.doubleField(2); - donneesNavire.tonnage=fr.doubleField(3); - donneesNavire.NbElemtnsParcours=fr.intField(4); - //allocation memoire pour le tableau de trajet a partir du nombre d elements: - donneesNavire.tableauTrajet=new Sinavi3ResultatsDonneeTrajet[donneesNavire.NbElemtnsParcours]; - FuLog.debug("trajet: "); - //lecture de la liste ddu trajet du navire donn\xE9 - //int indiceDonnee=5; - for(int i=0;i<donneesNavire.NbElemtnsParcours;i++) - { - /* - FuLog.debug("\n element: "+fr.stringField(indiceDonnee)); - //allocation memoire pour un element du trajet: - donneesNavire.tableauTrajet[i]=new SiporResultatsDonneeTrajet(); - //donnees associ\xE9es \xE0 un \xE9l\xE9ment - String typeElement=fr.stringField(indiceDonnee++); - if(typeElement.equals("T") ||typeElement.equals("t")) - donneesNavire.tableauTrajet[i].typeElement=0; - if(typeElement.equals("C") ||typeElement.equals("c")) - donneesNavire.tableauTrajet[i].typeElement=1; - if(typeElement.equals("E") ||typeElement.equals("e")) - donneesNavire.tableauTrajet[i].typeElement=2; - if(typeElement.equals("Q") ||typeElement.equals("q")) - donneesNavire.tableauTrajet[i].typeElement=3; - - FuLog.debug("\n indice element: "+fr.intField(indiceDonnee)); - donneesNavire.tableauTrajet[i].indiceElement=fr.intField(indiceDonnee++)-1; - - FuLog.debug("\n heure entree: "+fr.doubleField(indiceDonnee)); - donneesNavire.tableauTrajet[i].heureEntree=fr.doubleField(indiceDonnee++); - - FuLog.debug("\n heure sortie: "+fr.doubleField(indiceDonnee)); - donneesNavire.tableauTrajet[i].heureSortie=fr.doubleField(indiceDonnee++); - - donneesNavire.tableauTrajet[i].acces=fr.doubleField(indiceDonnee++); - - FuLog.debug("\n attente mar\xE9e: "+fr.doubleField(indiceDonnee)); - donneesNavire.tableauTrajet[i].marees=fr.doubleField(indiceDonnee++); - - FuLog.debug("\n attente securite: "+fr.doubleField(indiceDonnee)); - donneesNavire.tableauTrajet[i].secu=fr.doubleField(indiceDonnee++); - - FuLog.debug("\n attente occupation: "+fr.doubleField(indiceDonnee)); - donneesNavire.tableauTrajet[i].occupation=fr.doubleField(indiceDonnee++); - - FuLog.debug("\n attente indisponibilit\xE9: "+fr.doubleField(indiceDonnee)); - donneesNavire.tableauTrajet[i].indispo=fr.doubleField(indiceDonnee++); - */ - - //-- Variante suite aux modifications du fichier historique --// - - //-- lecture de la ligne contenant l'\xE9l\xE9ment parcouru - fr.readFields(); - - //allocation memoire pour un element du trajet: - donneesNavire.tableauTrajet[i]=new Sinavi3ResultatsDonneeTrajet(); - //donnees associ\xE9es \xE0 un \xE9l\xE9ment - String typeElement=fr.stringField(0); - if(typeElement.equals("T") ||typeElement.equals("t")) - donneesNavire.tableauTrajet[i].typeElement=0; - if(typeElement.equals("C") ||typeElement.equals("c")) - donneesNavire.tableauTrajet[i].typeElement=1; - if(typeElement.equals("E") ||typeElement.equals("e")) - donneesNavire.tableauTrajet[i].typeElement=2; - if(typeElement.equals("Q") ||typeElement.equals("q")) - donneesNavire.tableauTrajet[i].typeElement=3; - - FuLog.debug("\n indice element: "+fr.intField(1)); - donneesNavire.tableauTrajet[i].indiceElement=fr.intField(1)-1; - - FuLog.debug("\n heure entree: "+fr.doubleField(2)); - donneesNavire.tableauTrajet[i].heureEntree=fr.doubleField(2); - - FuLog.debug("\n heure sortie: "+fr.doubleField(3)); - donneesNavire.tableauTrajet[i].heureSortie=fr.doubleField(3); - - donneesNavire.tableauTrajet[i].acces=fr.doubleField(4); - - FuLog.debug("\n attente mar\xE9e: "+fr.doubleField(5)); - donneesNavire.tableauTrajet[i].marees=fr.doubleField(5); - - FuLog.debug("\n attente securite: "+fr.doubleField(6)); - donneesNavire.tableauTrajet[i].secu=fr.doubleField(6); - - FuLog.debug("\n attente occupation: "+fr.doubleField(7)); - donneesNavire.tableauTrajet[i].occupation=fr.doubleField(7); - - FuLog.debug("\n attente indisponibilit\xE9: "+fr.doubleField(7)); - donneesNavire.tableauTrajet[i].indispo=fr.doubleField(7); - - - - } - - //ajout des don\xE9esnavire dans le vecteur - vecteurListe.add(donneesNavire); - - } - else - { - //on quitte - //on recopie le contenue ainsi que le nombre de navire du vecteur dans al structure finale que lon renvoie ensuite - - //on connais le nombre de navires: il s agit du nombre d elements du vecteur - listeResultats.nombreNavires=vecteurListe.size(); - - //allocation memoire du tableau de navires - listeResultats.listeEvenements=new Sinavi3ResultatsSimulation[vecteurListe.size()]; - - for(int i=0;i<vecteurListe.size();i++) - { - listeResultats.listeEvenements[i]=(Sinavi3ResultatsSimulation) vecteurListe.get(i); - } - - - //renvoie de la structure finale: - return listeResultats; - - } - } - } - catch (final EOFException e) { - FuLog.debug("fin de fichier"); -// on connais le nombre de navires: il s agit du nombre d elements du vecteur - listeResultats.nombreNavires=vecteurListe.size(); - - //allocation memoire du tableau de navires - listeResultats.listeEvenements=new Sinavi3ResultatsSimulation[vecteurListe.size()]; - - for(int i=0;i<vecteurListe.size();i++) - { - listeResultats.listeEvenements[i]=(Sinavi3ResultatsSimulation) vecteurListe.get(i); - } - - - //renvoie de la structure finale: - return listeResultats; - - } - - /* - final Vector iterations= new Vector(); - Vector iteration= new Vector(); - final int[] fmt= - { 5, 3, 10, 10, 10, 10, 3, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }; - try { - while (true) { - fr.readFields(fmt); - if (!fr.stringField(0).equals(">") ) { - // Copie d'une ligne correspondant \xE0 un navire dans une instance de SResultatsBateauGenere - final SResultatsBateauGenere bateau= new SResultatsBateauGenere(); - bateau.numeroBateau= fr.intField(0); - bateau.numeroCategorie= fr.intField(1); - bateau.heureGeneration= fr.intField(2); - bateau.heureAccesChenal= fr.intField(3); - bateau.heureAccesEclusePourArrivee= fr.intField(4); - bateau.heureSortieEclusePourArrivee= fr.intField(5); - bateau.numeroQuai= fr.intField(6); - bateau.heureAccesQuai= fr.intField(7); - bateau.heureDepartQuai= fr.intField(8); - bateau.heureAccesEclusePourDepart= fr.intField(9); - bateau.heureSortieEclusePourDepart= fr.intField(10); - bateau.heureSortieRade= fr.intField(11); - bateau.attenteTotale= fr.intField(12); - bateau.attenteQuai= fr.intField(13); - bateau.attenteEcluse= fr.intField(14); - bateau.attenteMaree= fr.intField(15); - bateau.attenteCreneau= fr.intField(16); - iteration.add(bateau); - } else { - // C'est le separateur d'iteration qui a ete lu - // Copie du vecteur iteration dans une structure SResultatsIteration - final SResultatsIteration resultatsIteration= - new SResultatsIteration( - (new SResultatsBateauGenere[iteration.size()])); - for (int j= 0; j < iteration.size(); j++) { - resultatsIteration.resultatsIteration[j]= - (SResultatsBateauGenere)iteration.elementAt(j); - } - iteration= new Vector(); - iterations.add(resultatsIteration); - } - } - } catch (final EOFException e) { - // Execution a la fin du fichier - // Copie du dernier vecteur iteration dans une structure SResultatsIteration - final SResultatsIteration resultatsIteration= - new SResultatsIteration( - (new SResultatsBateauGenere[iteration.size()])); - for (int j= 0; j < iteration.size(); j++) { - resultatsIteration.resultatsIteration[j]= - (SResultatsBateauGenere)iteration.elementAt(j); - } - System.out.println( - resultatsIteration.resultatsIteration.length + "bateaux"); - iterations.add(resultatsIteration); - // Copie du vecteur iterations dans une instance de SResultatsIterations - final SResultatsIterations resultatsIterations= - new SResultatsIterations(new SResultatsIteration[iterations.size()]); - for (int j= 0; j < iterations.size(); j++) { - resultatsIterations.resultatsIterations[j]= - (SResultatsIteration)iterations.elementAt(j); - } - fr= null; - return resultatsIterations; - } - */ - } catch (final Exception ex) { - CDodico.exception(DResultatsSinavi3.class, ex); - } - return null; - } -} +/** + * @file DResultatsSinavi3.java + * @creation 1999-09-23 + * @modification $Date: 2008-01-25 14:02:01 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.sinavi3; +import java.io.*; +import java.util.*; +import java.util.Vector; +import org.fudaa.dodico.objet.*; +import org.fudaa.dodico.calcul.*; +import org.fudaa.dodico.fortran.FortranReader; +import org.fudaa.dodico.corba.sinavi3.*; +import com.memoire.fu.FuLog; +/** + * Permet d'acc\xE9der aux r\xE9sultats d'une simulation. + * + * @version $Revision: 1.4 $ $Date: 2008-08-13 11:00:00 $ by $Author: fargeix $ + * @author Nicolas Chevalier + */ +public class DResultatsSinavi3 + extends DResultats + implements IResultatsSinavi3,IResultatsSinavi3Operations { + private String fichier_; + public DResultatsSinavi3() { + super(); + fichier_= ""; + } + public final Object clone() throws CloneNotSupportedException { + final DResultatsSinavi3 r= new DResultatsSinavi3(); + r.fichier(fichier_); + return r; + } + public String toString() { + return "DResultatsSinavi3(" + fichier_ + ")"; + } + public String fichier() { + return fichier_; + } + /** + * Mutateur de fihcier. Ajoute "_histo.dat" \xE0 _fichier. + * + * @param _fichier + */ + public void fichier(final String _fichier) { + fichier_= _fichier + /*"_histo.dat"*/".his"; + } + /** + * Pour acc\xE9der aux r\xE9sultats. + * + * @return r\xE9sultats + */ + public Sinavi3ResultatListeevenementsSimu litResultatsSinavi3() { + return litResultatsSinavi3(fichier()); + } + /** + * Lit un fichier de r\xE9sultats et renvoie une instance de SResultatsIterations + * correspondant aux donn\xE9es lues. + * + * @param nomFichier + * @return r\xE9sultats + */ + public static double arrondire2decimales(double val) + { + val=val*100; + val=(int)(val+0.5); + val=val/100.0; + return val; + } + + public static Sinavi3ResultatListeevenementsSimu litResultatsSinavi3(final String nomFichier) { + try { + FuLog.debug("Lecture de " + nomFichier); + + Sinavi3ResultatListeevenementsSimu listeResultats= new Sinavi3ResultatListeevenementsSimu(); + + //vecteur dynamique qui servira a stocker chaque navire en attendant de connaitrez le nombre exact de navires + ArrayList vecteurListe=new ArrayList(); + + //structure finale qui contiendra la totalit\xE9 des navires + FortranReader fr= new FortranReader(new FileReader(nomFichier)); + + try { + while (true) { + fr.readFields(); + + if (fr.getNumberOfFields() > 2) { + //recopiage des parametres dans le champs + + //allocation m\xE9moire pour les donn\xE9es d un anvire + Sinavi3ResultatsSimulation donneesNavire=new Sinavi3ResultatsSimulation(); + FuLog.debug("num cat: "+fr.intField(0)+"\n categorie: "+(fr.intField(1)-1)+"\n longueur: "+fr.stringField(2)+"\n nb elements trajet: "+fr.intField(4)); + //recopiage des donn\xE9es du fichier dans la struture donneesNavire + donneesNavire.numero=fr.intField(0); + donneesNavire.categorie=fr.intField(1)-1; + String typeSens=fr.stringField(2); + if(typeSens.equals("A")) + donneesNavire.sens=0; + else + donneesNavire.sens=1; + + donneesNavire.NbElemtnsParcours=fr.intField(3); + //allocation memoire pour le tableau de trajet a partir du nombre d elements: + donneesNavire.tableauTrajet=new Sinavi3ResultatsDonneeTrajet[donneesNavire.NbElemtnsParcours]; + FuLog.debug("trajet: "); + //lecture de la liste ddu trajet du navire donn\xE9 + //int indiceDonnee=5; + for(int i=0;i<donneesNavire.NbElemtnsParcours;i++) + { + + + //-- Variante suite aux modifications du fichier historique --// + + //-- lecture de la ligne contenant l'\xE9l\xE9ment parcouru + fr.readFields(); + + //allocation memoire pour un element du trajet: + donneesNavire.tableauTrajet[i]=new Sinavi3ResultatsDonneeTrajet(); + //donnees associ\xE9es \xE0 un \xE9l\xE9ment + String typeElement=fr.stringField(0); + if(typeElement.equals("T") ||typeElement.equals("t")) + donneesNavire.tableauTrajet[i].typeElement=0; + else + donneesNavire.tableauTrajet[i].typeElement=1; + + FuLog.debug("\n indice element: "+fr.intField(1)); + donneesNavire.tableauTrajet[i].indiceElement=fr.intField(1)-1; + + //--Horaires et attentes sont en secondes, on les traduit donc en minutes (adaptation sipor) --// + FuLog.debug("\n heure entree: "+fr.doubleField(2)); + donneesNavire.tableauTrajet[i].heureEntree=fr.doubleField(2);///60.0; + + FuLog.debug("\n heure sortie: "+fr.doubleField(3)); + donneesNavire.tableauTrajet[i].heureSortie=fr.doubleField(3);///60.0; + + donneesNavire.tableauTrajet[i].acces=fr.doubleField(4);///60.0; + + FuLog.debug("\n attente securite: "+fr.doubleField(5)); + donneesNavire.tableauTrajet[i].secu=fr.doubleField(5);///60.0; + + FuLog.debug("\n attente occupation: "+fr.doubleField(6)); + donneesNavire.tableauTrajet[i].occupation=fr.doubleField(6);///60.0; + + FuLog.debug("\n attente indisponibilit\xE9: "+fr.doubleField(7)); + donneesNavire.tableauTrajet[i].indispo=fr.doubleField(7);///60.0; + + + + } + + //ajout des don\xE9esnavire dans le vecteur + vecteurListe.add(donneesNavire); + + } + else + { + //on quitte + //on recopie le contenue ainsi que le nombre de navire du vecteur dans al structure finale que lon renvoie ensuite + + //on connais le nombre de navires: il s agit du nombre d elements du vecteur + listeResultats.nombreNavires=vecteurListe.size(); + + //allocation memoire du tableau de navires + listeResultats.listeEvenements=new Sinavi3ResultatsSimulation[vecteurListe.size()]; + + for(int i=0;i<vecteurListe.size();i++) + { + listeResultats.listeEvenements[i]=(Sinavi3ResultatsSimulation) vecteurListe.get(i); + } + + + //renvoie de la structure finale: + return listeResultats; + + } + } + } + catch (final EOFException e) { + FuLog.debug("fin de fichier"); +// on connais le nombre de navires: il s agit du nombre d elements du vecteur + listeResultats.nombreNavires=vecteurListe.size(); + + //allocation memoire du tableau de navires + listeResultats.listeEvenements=new Sinavi3ResultatsSimulation[vecteurListe.size()]; + + for(int i=0;i<vecteurListe.size();i++) + { + listeResultats.listeEvenements[i]=(Sinavi3ResultatsSimulation) vecteurListe.get(i); + } + + + //renvoie de la structure finale: + return listeResultats; + + } + + + } catch (final Exception ex) { + CDodico.exception(DResultatsSinavi3.class, ex); + } + return null; + } +} Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java 2008-08-31 13:19:15 UTC (rev 3854) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java 2008-08-31 13:22:22 UTC (rev 3855) @@ -16,8 +16,7 @@ */ public static void CalculApresSImu(final Sinavi3DataSimulation donnees_) { /* - * rangements des diff\xE9rents type d'\xE9l\xE9ment dans le tableau: indiceType == 0 =>"chenal" indiceType == 1 =>"cercle" - * indiceType == 2 =>"ecluse" indiceType == 3 => "quai" + * rangements des diff\xE9rents type d'\xE9l\xE9ment dans le tableau: indiceType == 0 =>"chenal" indiceType == 1 =>"ecluse" */ /* @@ -30,7 +29,7 @@ int compteurElementsAttente; boolean trouve; /******************************************************************************************************************* - * CALCUL DES ATTENTES DANS LE SENS ENTRANT + * CALCUL DES ATTENTES DANS LE SENS AVALANT ******************************************************************************************************************/ // allocation de m\xE9moire pour autant d elements qu il y a eu de saisies resultats.AttentesTousElementsToutesCategoriesSens1 = new SParametresResultatsAttente[ donnees_.listeEcluse_.listeEcluses_.size() @@ -89,6 +88,8 @@ // cat\xE9gorie for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { + if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==0){ //-- test si sens avalant --// + // on r\xE9cup\xE8re la categorie associee au navire: final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; //resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; @@ -96,12 +97,7 @@ trouve = false; for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if(donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 3) - { - //-- On a pas trouv\xE9 l'\xE9l\xE9ment en entrant car on est deja arriv\xE9 au quai: on quitte donc la boucle --// - trouve=true; - } - else + if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 0 && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { trouve = true; @@ -213,7 +209,8 @@ } } - } + }//fin test sens avalant + }//fin de boucle historique for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { @@ -244,8 +241,8 @@ // ecluse for (int i = 0; i < donnees_.listeEcluse_.listeEcluses_.size(); i++) { resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente] = new SParametresResultatsAttente(); - // type element: il s agit d un quai donc 3 - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].typeElement = 2; + // type element: il s agit d une ecluse donc 1 + resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].typeElement = 1; resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].indiceElement = i; resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ .size()]; @@ -289,6 +286,7 @@ // cat\xE9gorie for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { + if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==0){ //-- test si sens avalant --// // on r\xE9cup\xE8re la categorie associee au navire: final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; //resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; @@ -296,13 +294,7 @@ // pour chaque element du trajet du navire k for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if(donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 3) - { - //-- On a pas trouv\xE9 l'\xE9l\xE9ment en entrant car on est deja arriv\xE9 au quai: on quitte donc la boucle --// - trouve=true; - } - else - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 2 + if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 1 && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { trouve = true; resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; @@ -413,6 +405,7 @@ } } + }//fin boucle historique for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { @@ -439,7 +432,7 @@ } /******************************************************************************************************************* - * CALCUL DES ATTENTES DANS LE SENS SORTANT + * CALCUL DES ATTENTES DANS LE SENS MONTANT ******************************************************************************************************************/ // allocation de m\xE9moire pour autant d elements qu il y a eu de saisies resultats.AttentesTousElementsToutesCategoriesSens2 = new SParametresResultatsAttente[ donnees_.listeEcluse_.listeEcluses_.size() @@ -496,20 +489,15 @@ // cat\xE9gorie for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { + if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==1){ //-- test si sens avalant --// // on r\xE9cup\xE8re la categorie associee au navire: final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; //resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; // pour chaque element du trajet du navire k des qu on trouve el premeir element on se retire trouve = false; - for (int e = donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours - 1; e >= 0 && !trouve; e--) { + for (int e =0; e<donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if(donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 3) - { - //-- On a pas trouv\xE9 l'\xE9l\xE9ment en entrant car on est deja arriv\xE9 au quai: on quitte donc la boucle --// - trouve=true; - } - else - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 0 + if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 0 && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { trouve = true; resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; @@ -619,7 +607,8 @@ } } - } + } + }//fin historique boucle for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { @@ -651,7 +640,7 @@ for (int i = 0; i < donnees_.listeEcluse_.listeEcluses_.size(); i++) { resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente] = new SParametresResultatsAttente(); // type element: il s agit d un quai donc 3 - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].typeElement = 2; + resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].typeElement = 1; resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].indiceElement = i; resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ .size()]; @@ -695,20 +684,15 @@ // cat\xE9gorie for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { + if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==1){ //-- test si sens avalant --// // on r\xE9cup\xE8re la categorie associee au navire: final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; //resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; trouve = false; // pour chaque element du trajet du navire k - for (int e = donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours - 1; e >= 0 && !trouve; e--) { - if(donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 3) - { - //-- On a pas trouv\xE9 l'\xE9l\xE9ment en entrant car on est deja arriv\xE9 au quai: on quitte donc la boucle --// - trouve=true; - } - else + for (int e =0; e<donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours&& !trouve; e++) { // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 2 + if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 1 && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { trouve = true; resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; @@ -817,8 +801,8 @@ } } - } + }//fin boucle historique for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { @@ -845,452 +829,9 @@ } - /******************************************************************************************************************* - * CALCUL DES ATTENTES DANS LES 2 SENS - ******************************************************************************************************************/ - // allocation de m\xE9moire pour autant d elements qu il y a eu de saisies - resultats.AttentesTousElementsToutesCategoriesLes2Sens = new SParametresResultatsAttente[donnees_.listeEcluse_.listeEcluses_.size() - + donnees_.listeBief_.listeBiefs_.size()]; - - compteurElementsAttente = 0; - trouve = false; - - // chenal - for (int i = 0; i < donnees_.listeBief_.listeBiefs_.size(); i++) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente] = new SParametresResultatsAttente(); - // type element: il s agit d un quai donc 3 - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].typeElement = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].indiceElement = i; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ - .size()]; - // initialisation de tous les parametres d'attente - for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; - - } - // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de - // cat\xE9gorie - - for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { - // on r\xE9cup\xE8re la categorie associee au navire: - final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - // pour chaque element du trajet du navire k des qu on trouve el premeir element on se retire - trouve = false; - for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { - // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 0 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { - trouve = true; - - int e2=-1; - boolean trouve2=false; - for(int z=e+1;z<donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve2;z++) - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[z].typeElement == 0 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[z].indiceElement == i) { - e2=z; - trouve=true; - } - //on comptabilise les diff\xE9rents temps d'attente - // attentes d'acces - // attente totale d'acces - double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; - if(e2!=-1) - attente+= donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].acces; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; - } - - // attentes de marees - // attente totale de marees - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; - if(e2!=-1) - attente+= donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].marees; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeTotale += attente; - // on incremente nb navires ayant attendu l'Maree si le temps d'Maree est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteMaree++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = attente; - } - - // attentes d'Secu - // attente totale d'Secu - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - if(e2!=-1) - attente+= donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].secu; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuTotale += attente; - // on incremente nb navires ayant attendu l'Secu si le temps d'Secu est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteSecu++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = attente; - } - - // attentes d'Occup - // attente totale d'Occup - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation; - if(e2!=-1) - attente+= donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].occupation; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupTotale += attente; - // on incremente nb navires ayant attendu l'Occup si le temps d'Occup est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAtenteOccup++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = attente; - } - - // attentes d'Panne - // attente totale d'Panne - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo; - if(e2!=-1) - attente+= donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].indispo; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneTotale += attente; - // on incremente nb navires ayant attendu l'Panne si le temps d'Panne est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttentePanne++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = attente; - } - - // attentes d'totale - // attente totale d'acces - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - if(e2!=-1) - attente+= donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].acces - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].marees - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].indispo - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].occupation - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].secu; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMegaTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteTotale++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = attente; - } - - } - } - - } - - for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { - if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = 0; - } - } - // incremente l element - compteurElementsAttente++; - } - - - // ecluse - for (int i = 0; i < donnees_.listeEcluse_.listeEcluses_.size(); i++) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente] = new SParametresResultatsAttente(); - // type element: il s agit d un quai donc 3 - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].typeElement = 2; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].indiceElement = i; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ - .size()]; - // initialisation de tous les parametres d'attente - for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; - - } - // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de - // cat\xE9gorie - - for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { - // on r\xE9cup\xE8re la categorie associee au navire: - final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - // pour chaque element du trajet du navire k des qu on trouve el premeir element on se retire - trouve = false; - for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { - // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 2 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { - trouve = true; - - - int e2=-1; - boolean trouve2=false; - for(int z=e+1;z<donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve2;z++) - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[z].typeElement == 2 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[z].indiceElement == i) { - e2=z; - trouve=true; - } - // on comptabilise les diff\xE9rents temps d'attente - - // attentes d'acces - // attente totale d'acces - double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; - if(e2!=-1) - attente += donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].acces; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; - } - - // attentes de marees - // attente totale de marees - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; - if(e2!=-1) - attente += donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e2].marees; - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeTotale += attente; - // on incremente nb navires ayant attendu l'Maree si le temps d'Maree est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteMaree++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attente... [truncated message content] |
From: <fa...@us...> - 2008-09-03 09:33:00
|
Revision: 3868 http://fudaa.svn.sourceforge.net/fudaa/?rev=3868&view=rev Author: fargeix Date: 2008-09-03 09:33:07 +0000 (Wed, 03 Sep 2008) Log Message: ----------- Modifications diverses Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java 2008-09-02 21:53:15 UTC (rev 3867) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java 2008-09-03 09:33:07 UTC (rev 3868) @@ -345,9 +345,12 @@ f.writeFields(fmt); for(int k=0;k<ec.listeEcluses[i].nombreCouplesDeterministes;k++) { - f.stringField(0, new Integer(ec.listeEcluses[i].TableauloiDeterministe[k].jour).toString()+" "+new Integer((int)ec.listeEcluses[i].TableauloiDeterministe[k].horaire).toString()); - f.stringField(2, " jour et horaire "+k+" de la loi deterministe de l'ecluse"+(i+1)); + f.stringField(0, new Integer(ec.listeEcluses[i].TableauloiDeterministe[k].jour).toString()); + f.stringField(2, "jour de la loi deterministe "+k+" de l'ecluse"+(i+1)); f.writeFields(fmt); + f.stringField(0, new Integer((int)ec.listeEcluses[i].TableauloiDeterministe[k].horaire).toString()); + f.stringField(2, "horaire de la loi deterministe "+k+" de l'ecluse"+(i+1)); + f.writeFields(fmt); /* f.stringField(0, new Integer(ec.listeEcluses[i].TableauloiDeterministe[k].jour).toString()); f.stringField(2, "jour "+k+" de la loi deterministe de l'ecluse"+(i+1)); @@ -493,16 +496,19 @@ { //loi deterministe: f.stringField(0, "D"); - f.stringField(2, "loi des indisponibilites du chenal"+(i+1)); + f.stringField(2, "loi des indisponibilites du bief"+(i+1)); f.writeFields(fmt); f.stringField(0, new Integer(c.listeCheneaux[i].nombreCouplesDeterministes).toString()); f.stringField(2, "nombre de couples deterministes du chenal"+(i+1)); f.writeFields(fmt); for(int k=0;k<c.listeCheneaux[i].nombreCouplesDeterministes;k++) { - f.stringField(0, new Integer(c.listeCheneaux[i].TableauloiDeterministe[k].jour).toString()+" "+new Integer((int)c.listeCheneaux[i].TableauloiDeterministe[k].horaire).toString()); - f.stringField(2, " jour et horaire "+k+" de la loi deterministe du chenal"+(i+1)); + f.stringField(0, new Integer(c.listeCheneaux[i].TableauloiDeterministe[k].jour).toString()); + f.stringField(2, "jour de la loi deterministe "+k+" du bief"+(i+1)); f.writeFields(fmt); + f.stringField(0, new Integer((int)c.listeCheneaux[i].TableauloiDeterministe[k].horaire).toString()); + f.stringField(2, "horaire de la loi deterministe "+k+" du bief"+(i+1)); + f.writeFields(fmt); /* f.stringField(0, new Integer(ec.listeEcluses[i].TableauloiDeterministe[k].jour).toString()); f.stringField(2, "jour "+k+" de la loi deterministe du chenal"+(i+1)); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java 2008-09-02 21:53:15 UTC (rev 3867) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java 2008-09-03 09:33:07 UTC (rev 3868) @@ -138,7 +138,7 @@ return; } else - if(jour<0){ + if(jour<=0){ new BuDialogError(donnees_.application_.getApp(), Sinavi3Implementation.isSinavi_, "Le jour doit \xEAtre positif.").activate(); return; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java 2008-09-02 21:53:15 UTC (rev 3867) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java 2008-09-03 09:33:07 UTC (rev 3868) @@ -828,10 +828,412 @@ compteurElementsAttente++; } + + + + /******************************************************************************************************************* + * CALCUL DES ATTENTES DANS LES 2 SENS CUMULES + ******************************************************************************************************************/ + // allocation de m\xE9moire pour autant d elements qu il y a eu de saisies + resultats.AttentesTousElementsToutesCategoriesLes2Sens = new SParametresResultatsAttente[ donnees_.listeEcluse_.listeEcluses_.size() + + donnees_.listeBief_.listeBiefs_.size() + ]; + compteurElementsAttente = 0; + trouve = false; + + // chenal + for (int i = 0; i < donnees_.listeBief_.listeBiefs_.size(); i++) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente] = new SParametresResultatsAttente(); + // type element: il s agit d un quai donc 3 + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].typeElement = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].indiceElement = i; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ + .size()]; + // initialisation de tous les parametres d'attente + for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; + + } + // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de + // cat\xE9gorie + + for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { + + // on r\xE9cup\xE8re la categorie associee au navire: + final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; + //resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; + // pour chaque element du trajet du navire k des qu on trouve el premeir element on se retire + trouve = false; + for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { + // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 + + if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 0 + && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { + trouve = true; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; + + // on comptabilise les diff\xE9rents temps d'attente + + // attentes d'acces + // attente totale d'acces + double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; + // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; + } + + // attentes de marees + // attente totale de marees + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeTotale += attente; + // on incremente nb navires ayant attendu l'Maree si le temps d'Maree est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteMaree++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = attente; + } + + // attentes d'Secu + // attente totale d'Secu + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuTotale += attente; + // on incremente nb navires ayant attendu l'Secu si le temps d'Secu est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteSecu++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = attente; + } + + // attentes d'Occup + // attente totale d'Occup + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupTotale += attente; + // on incremente nb navires ayant attendu l'Occup si le temps d'Occup est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAtenteOccup++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = attente; + } + + // attentes d'Panne + // attente totale d'Panne + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneTotale += attente; + // on incremente nb navires ayant attendu l'Panne si le temps d'Panne est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttentePanne++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = attente; + } + + // attentes d'totale + // attente totale d'acces + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMegaTotale += attente; + // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteTotale++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = attente; + } + + } + } + + }//fin de boucle historique + + for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = 0; + } + } + // incremente l element + compteurElementsAttente++; + } + + + // ecluse + for (int i = 0; i < donnees_.listeEcluse_.listeEcluses_.size(); i++) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente] = new SParametresResultatsAttente(); + // type element: il s agit d une ecluse donc 1 + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].typeElement = 1; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].indiceElement = i; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ + .size()]; + // initialisation de tous les parametres d'attente + for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; + + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; + + } + // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de + // cat\xE9gorie + + for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { + // on r\xE9cup\xE8re la categorie associee au navire: + final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; + //resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; + trouve = false; + // pour chaque element du trajet du navire k + for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { + // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 + if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 1 + && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { + trouve = true; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; + + // on comptabilise les diff\xE9rents temps d'attente + + // attentes d'acces + // attente totale d'acces + double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; + // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; + } + + // attentes de marees + // attente totale de marees + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeTotale += attente; + // on incremente nb navires ayant attendu l'Maree si le temps d'Maree est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteMaree++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = attente; + } + + // attentes d'Secu + // attente totale d'Secu + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuTotale += attente; + // on incremente nb navires ayant attendu l'Secu si le temps d'Secu est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteSecu++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = attente; + } + + // attentes d'Occup + // attente totale d'Occup + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupTotale += attente; + // on incremente nb navires ayant attendu l'Occup si le temps d'Occup est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAtenteOccup++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = attente; + } + + // attentes d'Panne + // attente totale d'Panne + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneTotale += attente; + // on incremente nb navires ayant attendu l'Panne si le temps d'Panne est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttentePanne++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = attente; + } + + // attentes d'totale + // attente totale d'acces + attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation + + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMegaTotale += attente; + // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: + if (attente != 0) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteTotale++; + } + // on teste si l'attente est minimale ou maximale: + if (attente > resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi = attente; + } + if (attente < resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = attente; + } + + } + } + + }//fin boucle historique + + for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = 0; + } + if (resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini == 9999999) { + resultats.AttentesTousElementsToutesCategoriesLes2Sens[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = 0; + } + } + // incremente l element + compteurElementsAttente++; + } + + + // on met par defaut els attentes en entr\xE9es dasn l'\xE9l\xE9ment: donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories = donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategoriesSens1; @@ -856,7 +1258,10 @@ // sens sortant: alors on charge la structure des r\xE9sultats dans le sa\xE9ns sortant donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories = donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategoriesSens2; - } + } else if (sensCirculation == 2) { + // sens sortant: alors on charge la structure des r\xE9sultats dans le sa\xE9ns sortant + donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories = donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategoriesLes2Sens; + } }// fin methode statique de calcul Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java 2008-09-02 21:53:15 UTC (rev 3867) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java 2008-09-03 09:33:07 UTC (rev 3868) @@ -96,7 +96,7 @@ /** horaire de depart */ // JTextField horaireDeb_=new JTextField(12); // JTextField horaireFin_=new JTextField(12); - String[] chaine_sens = { "Avalant", "Montant"}; + String[] chaine_sens = { "avalant", "montant", "tous"}; JComboBox Sens_ = new JComboBox(chaine_sens); /** @@ -104,7 +104,7 @@ */ BuPanel optionPanel_ = new BuPanel(); - JCheckBox choixNbNavires_ = new JCheckBox("nombre bateaux", true); + JCheckBox choixNbNavires_ = new JCheckBox("Nombre bateaux", true); JCheckBox choixTotalAttente_ = new JCheckBox("Attente totale", true); @@ -212,7 +212,7 @@ * constructeur de la sous fenetre de gestion des resultats: */ Sinavi3ResultatsAttenteGeneraleCategories(final Sinavi3DataSimulation _donnees) { - super("Attentes par cat\xE9gories", true, true, true, true); + super("Attentes par cat\xE9gorie de bateaux", true, true, true, true); // recuperation des donn\xE9es de la simulation donnees_ = _donnees; @@ -808,7 +808,7 @@ // moyenne attentes sur la flotte data[indiceTbaleau][indiceColonne++] = "" + Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes2((float) (this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[i].tableauAttenteCategories[val].attentePanneTotale / this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[i].tableauAttenteCategories[val].nombreNaviresTotal)); + .traduitMinutesEnHeuresMinutes2((float) (this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[i].tableauAttenteCategories[val].attenteMegaTotale / this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[i].tableauAttenteCategories[val].nombreNaviresTotal)); // nombre de navires qui attendent data[indiceTbaleau][indiceColonne++] = "" @@ -961,7 +961,7 @@ // moyenne attentes sur la flotte data[0][indiceColonne++] = "" - + (float) (this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[ELEMENTCHOISI].tableauAttenteCategories[val].attentePanneTotale / this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[ELEMENTCHOISI].tableauAttenteCategories[val].nombreNaviresTotal); + + (float) (this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[ELEMENTCHOISI].tableauAttenteCategories[val].attenteMegaTotale / this.donnees_.params_.ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[ELEMENTCHOISI].tableauAttenteCategories[val].nombreNaviresTotal); // nombre de navires qui attendent data[0][indiceColonne++] = "" Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java 2008-09-02 21:53:15 UTC (rev 3867) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java 2008-09-03 09:33:07 UTC (rev 3868) @@ -97,7 +97,7 @@ /** horaire de depart */ // JTextField horaireDeb_=new JTextField(12); // JTextField horaireFin_=new JTextField(12); - String[] chaine_sens = {"Avalant","Montant"}; + String[] chaine_sens = {"avalant", "montant", "tous"}; JComboBox Sens_ = new JComboBox(chaine_sens); /** @@ -1678,7 +1678,7 @@ int indiceColonne = 0; this.titreTableau_[indiceColonne++] = "Cat\xE9gorie"; if (this.choixNbNavires_.isSelected()) { - this.titreTableau_[indiceColonne++] = "Nb.bat.flotte"; + this.titreTableau_[indiceColonne++] = "Nb. bateaux"; } /*if (this.choixMarees_.isSelected()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bma...@us...> - 2008-11-20 13:16:03
|
Revision: 4227 http://fudaa.svn.sourceforge.net/fudaa/?rev=4227&view=rev Author: bmarchan Date: 2008-11-20 13:15:57 +0000 (Thu, 20 Nov 2008) Log Message: ----------- Correction pour une selection multicalques sur FudaaPrepro Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlVisuPanel.java Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java 2008-11-20 09:16:37 UTC (rev 4226) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java 2008-11-20 13:15:57 UTC (rev 4227) @@ -146,7 +146,7 @@ */ public BArbreCalqueModel(final BGroupeCalque _calque, final boolean _listener) { selection_ = new DefaultTreeSelectionModel(); - setSelectionMultiCalques(false); + setSelectionMultiCalques(true); mustListen_ = _listener; calque_ = _calque; if ((calque_ != null) && (calque_.isGroupeCalque())) { Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlVisuPanel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlVisuPanel.java 2008-11-20 09:16:37 UTC (rev 4226) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlVisuPanel.java 2008-11-20 13:15:57 UTC (rev 4227) @@ -58,6 +58,7 @@ */ public MdlVisuPanel(FudaaCommonImplementation _impl/*, boolean _createDefault*/) { super(_impl); + modelArbre_.setSelectionMultiCalques(false); initCalques(true); installLayerActions(); getScene().setRestrictedToCalqueActif(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2009-02-05 12:22:33
|
Revision: 4441 http://fudaa.svn.sourceforge.net/fudaa/?rev=4441&view=rev Author: fargeix Date: 2009-02-05 11:53:41 +0000 (Thu, 05 Feb 2009) Log Message: ----------- Mise ?\195?\160 jour Fudaa-Prepro v0.94 Modified Paths: -------------- trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.en.html trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.fr.html trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.en.html trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.fr.html trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.en.html trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.fr.html trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java trunk/fudaa_devel/fudaa-distrib/prepro/prepro.properties Modified: trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.en.html =================================================================== --- trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.en.html 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.en.html 2009-02-05 11:53:41 UTC (rev 4441) @@ -1,5 +1,6 @@ <div class="toc"> <ul> + <li><a href="#v093">Version 0.93 (2009-01-27)</a></li> <li><a href="#v092">Version 0.92 (2008-11-03)</a></li> <li><a href="#v091">Version 0.91 (2007-11-29)</a></li> <li><a href="#v090">Versions 0.90 (2007-09-18)</a></li> @@ -38,6 +39,15 @@ </div> +<h2 id="v093">Version 0.93 (2009-01-27)</h2> +<h3>Bugs corrected</h3> +<ul> + <li>error when trying to display node numbers</li> + <li>problems to select several layers at the same time</li> + <li>error while generating INP files (Reflux chain)</li> +</ul> + + <h2 id="v092">Version 0.92 (2008-11-03)</h2> <h3>Enhancements</h3> Modified: trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.fr.html =================================================================== --- trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.fr.html 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/aide/src/prepro/src/web/inc.history.fr.html 2009-02-05 11:53:41 UTC (rev 4441) @@ -1,5 +1,6 @@ <div class="toc"> <ul> + <li><a href="#v093">Version 0.93 (2009-01-27)</a></li> <li><a href="#v092">Version 0.92 (2008-11-03)</a></li> <li><a href="#v091">Version 0.91 (2007-11-29)</a></li> <li><a href="#v090">Version 0.90 (2007-09-18)</a></li> @@ -45,6 +46,14 @@ </div> +<h2 id="v093">Version 0.93 (2009-01-27)</h2> +<h3>Bogues corrig\xE9s</h3> +<ul> + <li>impossibilit\xE9 d'afficher les num\xE9ros de noeuds</li> + <li>impossibilit\xE9 de s\xE9lectionner plusieurs calques simultan\xE9ment</li> + <li>erreur \xE0 la g\xE9n\xE9ration de fichiers INP (chaine Reflux)</li> +</ul> + <h2 id="v092">Version 0.92 (2008-11-03)</h2> <h3>Am\xE9liorations</h3> <ul> Modified: trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.en.html =================================================================== --- trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.en.html 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.en.html 2009-02-05 11:53:41 UTC (rev 4441) @@ -2,7 +2,5 @@ <h3>Bugs corrected</h3> <ul> - <li>error when trying to display node numbers</li> - <li>problems to select several layers at the same time</li> - <li>error while generating INP files (Reflux chain)</li> + <li>error writing PREL information while generating INP files (Reflux chain)</li> </ul> \ No newline at end of file Modified: trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.fr.html =================================================================== --- trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.fr.html 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/aide/src/prepro/src/web/inc.last-changelog.fr.html 2009-02-05 11:53:41 UTC (rev 4441) @@ -2,7 +2,5 @@ <h2>Derni\xE8res modifications</h2> <h3>Bogues corrig\xE9s</h3> <ul> - <li>impossibilit\xE9 d'afficher les num\xE9ros de noeuds</li> - <li>impossibilit\xE9 de s\xE9lectionner plusieurs calques simultan\xE9ment</li> - <li>erreur \xE0 la g\xE9n\xE9ration de fichiers INP (chaine Reflux)</li> + <li>erreur \xE0 l'\xE9criture du bloc PREL lors de la g\xE9n\xE9ration de fichiers INP (chaine Reflux)</li> </ul> \ No newline at end of file Modified: trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.en.html =================================================================== --- trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.en.html 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.en.html 2009-02-05 11:53:41 UTC (rev 4441) @@ -11,6 +11,14 @@ </tr> <tr> <th colspan="1" rowspan="1"> + <p>2008-01-27</p> + </th> + <td colspan="1" rowspan="1"> + <p>New version: 0.93</p> + </td> + </tr> + <tr> + <th colspan="1" rowspan="1"> <p>2008-11-03</p> </th> <td colspan="1" rowspan="1"> Modified: trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.fr.html =================================================================== --- trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.fr.html 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/aide/src/prepro/src/web/inc.news.fr.html 2009-02-05 11:53:41 UTC (rev 4441) @@ -10,6 +10,14 @@ </tr> <tr> <th colspan="1" rowspan="1"> + <p>2008-01-27</p> + </th> + <td colspan="1" rowspan="1"> + <p>Nouvelle version: 0.93</p> + </td> + </tr> + <tr> + <th colspan="1" rowspan="1"> <p>2008-11-03</p> </th> <td colspan="1" rowspan="1"> Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2009-02-05 11:53:41 UTC (rev 4441) @@ -134,8 +134,8 @@ infoSoft = new BuInformationsSoftware(); infoSoft.name = "prepro"; - infoSoft.version = "0.93"; - infoSoft.date = "2009-01-27"; + infoSoft.version = "0.94"; + infoSoft.date = "2009-02-05"; infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009"; infoSoft.contact = "fre...@fu..."; infoSoft.license = "GPL2"; Modified: trunk/fudaa_devel/fudaa-distrib/prepro/prepro.properties =================================================================== --- trunk/fudaa_devel/fudaa-distrib/prepro/prepro.properties 2009-02-04 17:31:34 UTC (rev 4440) +++ trunk/fudaa_devel/fudaa-distrib/prepro/prepro.properties 2009-02-05 11:53:41 UTC (rev 4441) @@ -1,7 +1,7 @@ -@version@=0.93 -...@ve...le@=093 +@version@=0.94 +...@ve...le@=094 @exe.size@=22 Mo @jar.size@=22 Mo @jnlp.size@=13 Mo @zip.size@=22 Mo -@version.date@=2009-01-27 \ No newline at end of file +@version.date@=2009-02-05 \ 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: <fa...@us...> - 2009-02-19 14:35:41
|
Revision: 4487 http://fudaa.svn.sourceforge.net/fudaa/?rev=4487&view=rev Author: fargeix Date: 2009-02-19 14:35:34 +0000 (Thu, 19 Feb 2009) Log Message: ----------- Corrections apport?\195?\169es ?\195?\160 Fudaa-Refonde (correction bugs, modif pr?\195?\169cision r?\195?\169sultats, remplacement VAInstall par Izpack cse pbs compatibilit?\195?\169 OS) -> version 5.15f-beta3 (mise en ligne) Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeMaillage.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/commun/BPaletteCouleurPlage.java Added Paths: ----------- trunk/fudaa_devel/fudaa-distrib/refonde/ trunk/fudaa_devel/fudaa-distrib/refonde/build.xml trunk/fudaa_devel/fudaa-distrib/refonde/exemples/ trunk/fudaa_devel/fudaa-distrib/refonde/exemples/refonde/ trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.bat trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.sh trunk/fudaa_devel/fudaa-distrib/refonde/izpack/ trunk/fudaa_devel/fudaa-distrib/refonde/izpack/Unix_shortcutSpec.xml trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml trunk/fudaa_devel/fudaa-distrib/refonde/izpack/shortcutSpec.xml trunk/fudaa_devel/fudaa-distrib/refonde/manuels/ trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/ trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/Utilisation module seiche.doc trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/fudaa-refonde5-instal.doc trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/fudaa-refonde5.doc trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/index.html trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/mailleur-longueur_Onde.doc trunk/fudaa_devel/fudaa-distrib/refonde/visuel/ trunk/fudaa_devel/fudaa-distrib/refonde/visuel/fudaa-refonde.ico trunk/fudaa_devel/fudaa-distrib/refonde/visuel/refonde-banner.gif trunk/fudaa_devel/fudaa-distrib/refonde/visuel/refonde-logo.gif Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java 2009-02-19 13:16:03 UTC (rev 4486) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java 2009-02-19 14:35:34 UTC (rev 4487) @@ -411,14 +411,14 @@ } final BCalque parent = (BCalque) _e.getContainer(); if (parent != null) { - final Integer integer = ((Integer) c.getClientProperty("oldIndice")); +/* final Integer integer = ((Integer) c.getClientProperty("oldIndice")); if (integer == null) { - refresh(); - } else { +*/ refresh(); +/* } else { fireTreeModelEventRemoved(new TreeModelEvent(this, new TreePath(getPath(parent)), new int[] { integer .intValue() }, new Object[] { c })); } - setSelectionCalque(parent); +*/ setSelectionCalque(parent); } fireObservableChanged("removed"); } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java 2009-02-19 13:16:03 UTC (rev 4486) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java 2009-02-19 14:35:34 UTC (rev 4487) @@ -618,6 +618,9 @@ * @param _y le y du popup menu */ public void popMenu(final int _x, final int _y) { + if (listener_ == null) { + return; + } final JPopupMenu menu = listener_.getCmdsContextuelles(); if (menu == null) { return; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-02-19 13:16:03 UTC (rev 4486) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-02-19 14:35:34 UTC (rev 4487) @@ -89,10 +89,10 @@ new BuInformationsSoftware(); static { isRefonde_.name= "Refonde"; - isRefonde_.version= "5.15e"; - isRefonde_.date= "26-Jan-2005"; + isRefonde_.version= "5.15f-beta3"; + isRefonde_.date= "18-Fev-2009"; isRefonde_.rights= "1998-2000 GHN & CETMEF\n2000-2005 DeltaCAD & CETMEF"; - isRefonde_.contact= "pie...@eq..."; + isRefonde_.contact= "pie...@de..."; isRefonde_.license= "GPL2"; isRefonde_.logo= RefondeResource.REFONDE.getIcon("refonde-logo"); isRefonde_.banner= RefondeResource.REFONDE.getIcon("refonde-banner"); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeMaillage.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeMaillage.java 2009-02-19 13:16:03 UTC (rev 4486) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeMaillage.java 2009-02-19 14:35:34 UTC (rev 4487) @@ -17,6 +17,7 @@ import java.io.Reader; import java.io.StreamTokenizer; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; import java.util.Hashtable; import java.util.List; @@ -92,17 +93,16 @@ //System.err.println("inutile ??"); return _mails[0]; } - HashSet hnds= new HashSet(); - HashSet hels= new HashSet(); + HashSet<GrNoeud> hnds= new HashSet<GrNoeud>(); + HashSet<GrElement> hels= new HashSet<GrElement>(); GrNoeud[] nds; GrElement[] els; for (int i= 0; i < _mails.length; i++) { + hnds.addAll(Arrays.asList(_mails[i].noeuds())); + hels.addAll(Arrays.asList(_mails[i].elements())); //fred : ajout d'une methode pour optimiser ce passer -// hnds.addAll(Arrays.asList(_mails[i].noeuds())); -// hels.addAll(Arrays.asList(_mails[i].elements())); - //nouvelle version - _mails[i].ajouteTousLesElements(hels); - _mails[i].ajouteTousLesNoeuds(hnds); +// _mails[i].ajouteTousLesElements(hels); +// _mails[i].ajouteTousLesNoeuds(hnds); } nds= new GrNoeud[hnds.size()]; hnds.toArray(nds); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/commun/BPaletteCouleurPlage.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/commun/BPaletteCouleurPlage.java 2009-02-19 13:16:03 UTC (rev 4486) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/commun/BPaletteCouleurPlage.java 2009-02-19 14:35:34 UTC (rev 4487) @@ -315,8 +315,8 @@ */ public void ajusteLegendes() { NumberFormat nf= NumberFormat.getInstance(Locale.US); - nf.setMaximumFractionDigits(2); - nf.setMinimumFractionDigits(2); + nf.setMaximumFractionDigits(3); + nf.setMinimumFractionDigits(3); String lg; for (int i= 0; i < plages_.length; i++) { if (plages_[i].min == Double.POSITIVE_INFINITY) Added: trunk/fudaa_devel/fudaa-distrib/refonde/build.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/build.xml (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/refonde/build.xml 2009-02-19 14:35:34 UTC (rev 4487) @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="ISO-8859-15"?> +<!-- +! @creation 2009-1-22 +! @modification $Date: 2009-1-22 12:00:00 $ +! @license GNU General Public License 2 +! @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne +! @version $Id: build.xml,v 1.2 2008-11-28 12:00:00 fargeix Exp $ +! @author Mederic FARGEIX +! +! build permettant de construire le jar +--> +<project name="refonde" default="deploy" basedir="."> + <import file="../ant-deploy.xml" /> + <taskdef name="izpack" classpath="../commun/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" /> + <property name="this.main.class" value="Refonde" /> + <target name="createJar" depends=".testCheminGenJar" description="cree fudaa_refonde.jar"> + <mkdir dir="${this.jar.dir}" /> + <delete file="${this.jar.file}" /> + <genjar jarfile="${this.jar.file}"> + <manifest> + <attribute name="Main-Class" value="org.fudaa.fudaa.refonde.Refonde" /> + </manifest> + <classpath path="${fudaaDist.classpath}" /> + <class name="org.fudaa.fudaa.refonde.Refonde" /> + <library jar="${ctulu.lib.dir}/expr.jar" /> + <library jar="${ctulu.lib.dir}/jsci.jar" /> + <library jar="${ctulu.lib.dir}/koml.jar" /> + <library jar="${ctulu.lib.dir}/trove.jar" /> + <library jar="${ctulu.lib.dir}/vrml97.jar" /> + <class> + <fileset dir="${fudaa.dist.classes.dir}"> + <include name="org/fudaa/dodico/**/*.class" /> + <include name="org/fudaa/fudaa/refonde/**/*.class" /> + </fileset> + </class> + <classfilter> + <exclude name="org.fudaa.dodico.corba." /> + <exclude name="org.fudaa.dodico." /> + <include name="org.fudaa.dodico.corba.base." /> + <include name="org.fudaa.dodico.corba.calcul." /> + <include name="org.fudaa.dodico.calcul." /> + <include name="org.fudaa.dodico.corba.evenement." /> + <include name="org.fudaa.dodico.evenement." /> + <include name="org.fudaa.dodico.corba.association." /> + <include name="org.fudaa.dodico.association." /> + <include name="org.fudaa.dodico.boony." /> + <include name="org.fudaa.dodico.corba.usine." /> + <include name="org.fudaa.dodico.usine." /> + <include name="org.fudaa.dodico.corba.objet." /> + <include name="org.fudaa.dodico.objet." /> + <include name="org.fudaa.dodico.fortran." /> + <include name="org.fudaa.dodico.commun." /> + <include name="org.fudaa.dodico.corba.lido." /> + <include name="org.fudaa.dodico.lido." /> + <include name="org.fudaa.dodico.corba.hydraulique1d." /> + <include name="org.fudaa.dodico.hydraulique1d." /> + <include name="org.fudaa.dodico.corba.refonde." /> + <include name="org.fudaa.dodico.refonde." /> + </classfilter> + <resource> + <fileset dir="${fudaa.dist.classes.dir}"> + <patternset refid="ressources.fic" /> + <include name="com/memoire/bu/" /> + <include name="com/memoire/dnd/" /> + <include name="com/memoire/dja/" /> + <include name="org/fudaa/dodico/vag/" /> + <include name="org/fudaa/dodico/usine/" /> + <include name="org/fudaa/dodico/boony/" /> + <include name="org/fudaa/dodico/commun/" /> + <include name="org/fudaa/dodico/hydraulique1d/" /> + <include name="org/fudaa/dodico/refonde/" /> + <include name="org/fudaa/ebli/ressource/" /> + <include name="org/fudaa/ebli/calque/" /> + <include name="org/fudaa/fudaa/commun/" /> + <include name="org/fudaa/fudaa/ressource/" /> + <include name="org/fudaa/fudaa/refonde/" /> + <include name="ghm/followgui/" /> + <include name="com/hexidec/ekit/" /> + </fileset> + </resource> + </genjar> + </target> + <target name="createInstaller" description="cree l'installeur Fudaa-Refonde"> + <izpack input="izpack/izpack_fudaa_refonde.xml" output="../../../distrib/build/jar/refonde/Fudaa_Refonde_Install.jar" basedir="." /> + </target> +</project> \ No newline at end of file Added: trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.bat =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.bat (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.bat 2009-02-19 14:35:34 UTC (rev 4487) @@ -0,0 +1,6 @@ +echo off +cls +echo Execution de Fudaa-Refonde en cours... +java.exe -Xmx512m -jar fudaa-refonde.jar "--no_corba" +cls +echo Fin d'execution de Fudaa-Refonde Added: trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.sh =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.sh (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.sh 2009-02-19 14:35:34 UTC (rev 4487) @@ -0,0 +1,4 @@ +#!/bin/sh +### Launch Script for Fudaa-Refonde + +java -Xmx512m -jar ./fudaa-refonde.jar "--no_corba" Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/fudaa-refonde.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/fudaa_devel/fudaa-distrib/refonde/izpack/Unix_shortcutSpec.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/izpack/Unix_shortcutSpec.xml (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/refonde/izpack/Unix_shortcutSpec.xml 2009-02-19 14:35:34 UTC (rev 4487) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<shortcuts> + <programGroup defaultName="Fudaa-Refonde" location="applications"/> + <shortcut + name="Lancer Fudaa-Refonde" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$JAVA_HOME/bin/java" + commandLine="-DINSTALLDIR=$INSTALL_PATH -Xmx512m -jar "$INSTALL_PATH/fudaa-refonde.jar" "--no_corba" " + initialState="noShow" + iconFile="$INSTALL_PATH/fudaa-refonde.ico" + workingDirectory="$INSTALL_PATH" + type="Application" + encoding="UTF-8" + description="Lance le logiciel Fudaa-Refonde"> + <createForPack name="Fudaa-Refonde"/> + </shortcut> + + <shortcut + name="Supprimer Fudaa-Refonde" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$JAVA_HOME/bin/java" + commandLine="-jar "$INSTALL_PATH/Uninstaller/uninstaller.jar"" + initialState="noShow" + iconFile="trashcan_full" + iconIndex="0" + workingDirectory="" + type="Application" + encoding="UTF-8" + description="Supprime le logiciel Fudaa-Refonde"> + <createForPack name="Fudaa-Refonde"/> + </shortcut> + +</shortcuts> \ No newline at end of file Added: trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml 2009-02-19 14:35:34 UTC (rev 4487) @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> + +<!-- + A sample installation file. + Use it as a base for your own installers :-) + + To compile it : + - go in the bin directory where you installed IzPack + - call "compile ../sample/install.xml -b ../sample" +--> + +<installation version="1.0"> + + <!-- + The info section. + The meaning of the tags should be natural ... + --> + <info> + <appname>Fudaa-Refonde</appname> + <appversion>5.15f-beta3</appversion> + <authors> + <author name="Bertrand MARCHAND" email="de...@fu..."/> + </authors> + <url>http://www.utc.fr/fudaa/refonde/</url> + </info> + + <!-- + The gui preferences indication. + Sets the installer window to 640x480. It will not be able to change the size. + --> + <guiprefs width="800" height="520" resizable="no"/> + + <variables> + <variable name="$DesktopShortcutCheckboxEnabled" value="true"/> + </variables> + + <!-- + The locale section. + Asks here to include the English and French langpacks. + --> + <locale> + <langpack iso3="fra"/> + </locale> + + <!-- + The resources section. + The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel. + --> + <resources> + <res id="LicencePanel.licence" src="../commun/licence.txt"/> + <res id="shortcutSpec.xml" src="izpack/shortcutSpec.xml"/> + <res id="Unix_shortcutSpec.xml" src="izpack/Unix_shortcutSpec.xml"/> + <res src="visuel/refonde-banner.gif" id="Installer.image.0"/> + </resources> + + <!-- + The panels section. + We indicate here which panels we want to use. The order will be respected. + --> + <panels> + <panel classname="HelloPanel" id="hellopanel"/> + <panel classname="LicencePanel" id="licensepanel"/> + <panel classname="TargetPanel" id="targetpanel"/> + <panel classname="PacksPanel" id="packspanel"/> + <panel classname="InstallPanel" id="installpanel"/> + <panel classname="ShortcutPanel" id="shortcutpanel"/> + <panel classname="FinishPanel" id="finishpanel"/> + </panels> + + <!-- + The packs section. + We specify here our packs. + --> + + <packs> + <pack name="Fudaa-Refonde" required="yes"> + <description>Installe tous les composants du logiciel Fudaa-Refonde</description> + <file src="../commun/licence.txt" targetdir="$INSTALL_PATH"/> + <file src="fudaa-refonde.bat" targetdir="$INSTALL_PATH"/> + <file src="fudaa-refonde.sh" targetdir="$INSTALL_PATH"/> + <file src="visuel/fudaa-refonde.ico" targetdir="$INSTALL_PATH"/> + <file src="../../../distrib/build/jar/refonde/fudaa-refonde.jar" targetdir="$INSTALL_PATH"/> + <file src="manuels" targetdir="$INSTALL_PATH"/> + <file src="../../fudaa/serveurs/dunes" targetdir="$INSTALL_PATH/serveurs"/> + <file src="../../fudaa/serveurs/olb" targetdir="$INSTALL_PATH/serveurs"/> + <file src="../../fudaa/serveurs/refonde" targetdir="$INSTALL_PATH/serveurs"/> + <executable targetfile="$INSTALL_PATH/serveurs/dunes/dunes-Linux.x" stage="never"/> + <executable targetfile="$INSTALL_PATH/serveurs/dunes/dunes-SunOS.x" stage="never"/> + <executable targetfile="$INSTALL_PATH/serveurs/olb/olb-Linux.x" stage="never"/> + <executable targetfile="$INSTALL_PATH/serveurs/olb/olb-SunOS.x" stage="never"/> + <executable targetfile="$INSTALL_PATH/serveurs/refonde/refonde1-Linux.x" stage="never"/> + <executable targetfile="$INSTALL_PATH/serveurs/refonde/refonde2-Linux.x" stage="never"/> + <executable targetfile="$INSTALL_PATH/serveurs/refonde/seiche.x" stage="never"/> + <executable targetfile="$INSTALL_PATH/fudaa-refonde.sh" stage="never"/> + </pack> + <pack name="Exemples de projets Fudaa-Refonde" required="no"> + <description>Installe des exemples de projets pour Fudaa-Refonde</description> + <file src="exemples" targetdir="$INSTALL_PATH"/> + </pack> + </packs> + + <native type="izpack" name="ShellLink.dll"/> + +</installation> Added: trunk/fudaa_devel/fudaa-distrib/refonde/izpack/shortcutSpec.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/izpack/shortcutSpec.xml (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/refonde/izpack/shortcutSpec.xml 2009-02-19 14:35:34 UTC (rev 4487) @@ -0,0 +1,36 @@ +<shortcuts> + <skipIfNotSupported/> + <programGroup defaultName="Applications Fudaa\Refonde" location="applications"/> + <shortcut + name="Lancer Fudaa-Refonde" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$INSTALL_PATH\fudaa-refonde.bat" + commandLine="" + workingDirectory="$INSTALL_PATH" + iconFile="$INSTALL_PATH\fudaa-refonde.ico" + initialState="noShow" + description="Lance le logiciel Fudaa-Refonde"> + <createForPack name="Fudaa-Refonde"/> + </shortcut> + + <shortcut + name="Supprimer Fudaa-Refonde" + programGroup="yes" + desktop="no" + applications="no" + startMenu="no" + startup="no" + target="$INSTALL_PATH\Uninstaller\uninstaller.jar" + commandLine="" + iconFile="%SystemRoot%\system32\SHELL32.dll" + iconIndex="31" + description="Supprime le logiciel Fudaa-Refonde"> + + <createForPack name="Fudaa-Refonde"/> + </shortcut> + +</shortcuts> Added: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/Utilisation module seiche.doc =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/Utilisation module seiche.doc ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/fudaa-refonde5-instal.doc =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/fudaa-refonde5-instal.doc ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/fudaa-refonde5.doc =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/fudaa-refonde5.doc ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/index.html =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/index.html (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/index.html 2009-02-19 14:35:34 UTC (rev 4487) @@ -0,0 +1,17 @@ +<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <meta name="Author" content="Bertrand Marchand"> + + <meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]"> + <title>Documentation Prefonde</title> +</head> + <body> + <b><font color="#000000">La documentation d'utilisation se trouve sur le +répertoire d'installation du logiciel sous le nom "fudaa-refonde5.doc".</font></b> + +</body> +</html> Added: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/mailleur-longueur_Onde.doc =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/manuels/refonde/mailleur-longueur_Onde.doc ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/refonde/visuel/fudaa-refonde.ico =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/visuel/fudaa-refonde.ico ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/refonde/visuel/refonde-banner.gif =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/visuel/refonde-banner.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/refonde/visuel/refonde-logo.gif =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/refonde/visuel/refonde-logo.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: <fa...@us...> - 2009-03-12 16:16:04
|
Revision: 4526 http://fudaa.svn.sourceforge.net/fudaa/?rev=4526&view=rev Author: fargeix Date: 2009-03-12 16:15:41 +0000 (Thu, 12 Mar 2009) Log Message: ----------- Modifications diverses Refonde Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurAncre.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/astuces.txt trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFillePost.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java 2009-03-10 18:01:18 UTC (rev 4525) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java 2009-03-12 16:15:41 UTC (rev 4526) @@ -106,6 +106,16 @@ c_.anchor = GridBagConstraints.NORTHWEST; } else if (ancre_ == BSelecteurAncre.UP_RIGHT) { c_.anchor = GridBagConstraints.NORTHEAST; + } else if (ancre_ == BSelecteurAncre.UP_CENTRE) { + c_.anchor = GridBagConstraints.NORTH; + } else if (ancre_ == BSelecteurAncre.BOT_CENTRE) { + c_.anchor = GridBagConstraints.SOUTH; + } else if (ancre_ == BSelecteurAncre.MID_LEFT) { + c_.anchor = GridBagConstraints.WEST; + } else if (ancre_ == BSelecteurAncre.MID_RIGHT) { + c_.anchor = GridBagConstraints.EAST; + } else if (ancre_ == BSelecteurAncre.MID_CENTRE) { + c_.anchor = GridBagConstraints.CENTER; } add(pnLegendes_, c_); } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurAncre.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurAncre.java 2009-03-10 18:01:18 UTC (rev 4525) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurAncre.java 2009-03-12 16:15:41 UTC (rev 4526) @@ -45,7 +45,7 @@ int ancre_; public BSelecteurAncre() { - this(BOT_LEFT); + this(UP_RIGHT); } public static boolean isAncreBottom(final int _i) { @@ -123,7 +123,7 @@ ancre_ = BOT_CENTRE; } else if ((_x >= 0) && (_x < 17) && (_y >= 17) && (_y <= 34)) { ancre_ = MID_LEFT; - } else if ((_x > 34) && (_x < 52) && (_y >= 34) && (_y < 52)) { + } else if ((_x > 34) && (_x < 52) && (_y >= 17) && (_y <= 34)) { ancre_ = MID_RIGHT; } repaint(); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/astuces.txt =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/astuces.txt 2009-03-10 18:01:18 UTC (rev 4525) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/astuces.txt 2009-03-12 16:15:41 UTC (rev 4526) @@ -1,3 +1,3 @@ CTRL+Q est le raccourci pour sortir de l'application. -ALT+F2 pour obtenir les pr\xE9f\xE9rences. +ALT+F2 pour obtenir les preferences. Dans Edition/Preferences, vous pouvez personnaliser votre bureau. Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java 2009-03-10 18:01:18 UTC (rev 4525) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java 2009-03-12 16:15:41 UTC (rev 4526) @@ -86,6 +86,8 @@ */ public RefondeFilleCalques(BuCommonInterface _app, BArbreCalque _ac) { super(null, _app); + this.setClosable(false); + this.setTitle("Fen\xEAtre principale"); addInternalFrameListener(_ac); app_= _app; BCalque cqRoot= getVueCalque().getCalque(); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFillePost.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFillePost.java 2009-03-10 18:01:18 UTC (rev 4525) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFillePost.java 2009-03-12 16:15:41 UTC (rev 4526) @@ -48,7 +48,8 @@ * @author Bertrand Marchand */ public class RefondeFillePost - extends EbliFilleCalques { + extends EbliFilleCalques + implements PropertyChangeListener { /** Num\xE9ro de fen\xE8tre, incr\xE9ment\xE9 \xE0 chaque cr\xE9ation. Ce num\xE9ro ne sert que dans la liste de fen\xE8tres, pour les diff\xE9rentier. */ @@ -111,7 +112,8 @@ // cqRoot.add(cqDesI); // Tools sp\xE9cifiques de la fen\xEAtre CalqueGuiHelper.CALQUE_OUTILS.addPropertyChangeListener( - getArbreCalqueModel()); + getArbreCalqueModel());//_ac.getArbreModel()); + CalqueGuiHelper.CALQUE_OUTILS.addPropertyChangeListener(this); buildTools(); getVueCalque().setBackground(Color.white); setTitle("Fen\xEAtre post " + (++numero_)); @@ -457,4 +459,10 @@ // for (int i=0; i<btTools_.length; i++) btTools_[i].setEnabled(false); // for (int i=0; i<cps.length; i++) cps[i].setEnabled(true); // } + + public void propertyChange(PropertyChangeEvent _evt) { + if (_evt.getPropertyName().equals("ancre")) { + cqLeg_.setAncre(((Integer)_evt.getNewValue()).intValue()); + } + } } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-03-10 18:01:18 UTC (rev 4525) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-03-12 16:15:41 UTC (rev 4526) @@ -89,8 +89,8 @@ new BuInformationsSoftware(); static { isRefonde_.name= "Refonde"; - isRefonde_.version= "5.15f-beta3"; - isRefonde_.date= "18-Fev-2009"; + isRefonde_.version= "5.15f-beta6"; + isRefonde_.date= "12-Mar-2009"; isRefonde_.rights= "1998-2000 GHN & CETMEF\n2000-2005 DeltaCAD & CETMEF"; isRefonde_.contact= "pie...@de..."; isRefonde_.license= "GPL2"; @@ -475,28 +475,40 @@ //------------------------------------------------------------------------------ public void actionPerformed(ActionEvent _evt) { String action= _evt.getActionCommand(); - if (action.equals("CREERPROJET")) + if (action.equals("CREERPROJET")) { cmdNouveauProjet(); - else if (action.equals("OUVRIRPROJET")) + return; + } + else if (action.equals("OUVRIRPROJET")) { cmdOuvrirProjet(); + return; + } else if (action.equals("OUVRIRFICHIERS")) cmdOuvrirFichiers(); - else if (action.equals("ENREGISTRERPROJET")) + else if (action.equals("ENREGISTRERPROJET")) { cmdEnregistrerProjet(); - else if (action.equals("ENREGISTRERPROJETSOUS")) + return; + } + else if (action.equals("ENREGISTRERPROJETSOUS")) { cmdEnregistrerProjetSous(); + return; + } else if (action.equals("ENREGISTRERFICHIERS")) cmdEnregistrerFichiers(); - else if (action.equals("FERMER")) + else if (action.equals("FERMER")) { cmdFermerProjet(); + return; + } else if (action.equals("PROPRIETESPROJET")) cmdProprietesProjet(); else if (action.equals("PROPRIETESBORD")) cmdProprietesBord(); else if (action.equals("PROPRIETESFOND")) cmdProprietesFond(); - else if (action.equals("MAILLER")) + else if (action.equals("MAILLER")) { cmdMailler(); + return; + } else if (action.equals("SUPPRIMERMAILLAGE")) cmdSupprimerMaillage(); else if (action.equals("CALCULERANGLES")) @@ -509,10 +521,15 @@ cmdModifierAngSup(); else if (action.equals("PARAMETRESCALCUL")) cmdParametresCalcul(); - else if (action.equals("CALCULER")) + else if (action.equals("CALCULER")) { cmdExecuterRefonde(); + return; + } else if (action.equals("REPRENDRECALCUL")) + { cmdReprendreCalcul(); + return; + } else if (action.equals("AFFICHERTRACEEXE")) cmdAfficherTraceExe(SERVEUR_REFONDE); else if (action.equals("PREFERENCE")) @@ -523,12 +540,18 @@ cmdVoirNumElements(((AbstractButton)_evt.getSource()).isSelected()); else if (action.equals("VUE3D")) cmdVue3D(); - else if (action.equals("EXPORTERREFONDECALCUL")) + else if (action.equals("EXPORTERREFONDECALCUL")) { cmdExporterRefondeCalcul(); - else if (action.equals("EXPORTERMAILLAGE")) + return; + } + else if (action.equals("EXPORTERMAILLAGE")) { cmdExporterPostfluxMaillage(); - else if (action.equals("IMPORTERMAILLAGE")) + return; + } + else if (action.equals("IMPORTERMAILLAGE")) { cmdImporterMaillage(); + return; + } else if (action.equals("CREERDIGUE")) cmdCreerDigue(); else if (action.equals("SUPPRIMERDIGUE")) @@ -552,8 +575,10 @@ cmdRecentrerNoeud(); else if (action.equals("RECENTRERELEMENT")) cmdRecentrerElement(); - else if (action.startsWith("REOUVRIR")) + else if (action.startsWith("REOUVRIR")) { cmdReouvrir(action); + return; + } // else if (action.equals("TESTER" )) cmdTester(); // else if (action.equals("TESTER2" )) cmdTester2(); else if ( @@ -632,8 +657,8 @@ if (save) oprEnregistrerProjet(); // Nettoyage du desktop + clearDeskTop(); removeInternalFrame(fnCalques_); - clearDeskTop(); projet= null; // Selection de la g\xE9om\xE9trie \xE0 ouvrir RefondeDialogPanneau di; @@ -792,8 +817,8 @@ oprEnregistrerProjet(); // Nettoyage du desktop + clearDeskTop(); removeInternalFrame(fnCalques_); - clearDeskTop(); projet= null; oprOuvrirProjet(fichier); @@ -835,8 +860,8 @@ if (save) oprEnregistrerProjet(); // Nettoyage du desktop + clearDeskTop(); removeInternalFrame(fnCalques_); - clearDeskTop(); projet= null; // Selection du projet \xE0 ouvrir if (diProjet_ == null) { @@ -901,12 +926,12 @@ // setEnabledForAction("RECENTRERNOEUD" ,false); // setEnabledForAction("RECENTRERELEMENT" ,false); // setEnabledForAction("FERMER" ,false); - clearDeskTop(); + // clearDeskTop(); projet= new RefondeProjet(); projet.addMessageListener(this); projet.ouvrir(_fichier); // projet=RefondeProjet.ouvrir(fichier); - fnCalques_.initialise(projet); + fnCalques_.initialise(projet); // Blocage \xE0 corriger dans l'initialisation des calques addInternalFrame(fnCalques_); fnCalques_.restaurer(); statusBar.setProgression(100); @@ -1188,8 +1213,8 @@ try { if (save) oprEnregistrerProjet(); + clearDeskTop(); removeInternalFrame(fnCalques_); - clearDeskTop(); projet= null; // setEnabledForAction("OUVRIRFICHIERS" ,false); // setEnabledForAction("ENREGISTRERPROJET" ,false); Modified: trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml 2009-03-10 18:01:18 UTC (rev 4525) +++ trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml 2009-03-12 16:15:41 UTC (rev 4526) @@ -17,7 +17,7 @@ --> <info> <appname>Fudaa-Refonde</appname> - <appversion>5.15f-beta3</appversion> + <appversion>5.15f-beta6</appversion> <authors> <author name="Bertrand MARCHAND" email="de...@fu..."/> </authors> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2009-04-07 15:55:34
|
Revision: 4616 http://fudaa.svn.sourceforge.net/fudaa/?rev=4616&view=rev Author: fargeix Date: 2009-04-07 15:55:21 +0000 (Tue, 07 Apr 2009) Log Message: ----------- Fudaa-Refonde 5.15f-RC1 - Correction de bugs dont une situation d'interblocage r?\195?\169currente Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeInformations.java trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java 2009-04-07 13:34:12 UTC (rev 4615) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java 2009-04-07 15:55:21 UTC (rev 4616) @@ -400,7 +400,16 @@ public void internalFrameClosing(final InternalFrameEvent _e) {} - public void internalFrameDeactivated(final InternalFrameEvent _e) {} + public void internalFrameDeactivated(final InternalFrameEvent _e) { + final JInternalFrame f = _e.getInternalFrame(); + if (f instanceof EbliFilleCalquesInterface) { + final BArbreCalqueModel c = ((EbliFilleCalquesInterface) f).getArbreCalqueModel(); + if (c == getModel()) { + getSelectionModel().clearSelection(); + setModel(null); + } + } + } public void internalFrameDeiconified(final InternalFrameEvent _e) {} Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java 2009-04-07 13:34:12 UTC (rev 4615) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleCalques.java 2009-04-07 15:55:21 UTC (rev 4616) @@ -584,6 +584,7 @@ cqRoot.remove(cqAnglesTrans); cqRoot.getCalqueParNom("cqADMIN").remove(cqSaisieAngle); cqRoot.getCalqueParNom("cqADMIN").remove(cqFormeI); + getVueCalque().repaint(); cqContours.initialise(_projet); cqMaillage.initialise(_projet); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-04-07 13:34:12 UTC (rev 4615) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-04-07 15:55:21 UTC (rev 4616) @@ -26,6 +26,7 @@ import javax.swing.JMenu; import javax.swing.JOptionPane; import javax.swing.SwingConstants; +import javax.swing.SwingUtilities; import javax.swing.event.InternalFrameEvent; import com.memoire.bu.*; @@ -61,6 +62,7 @@ import org.fudaa.fudaa.commun.dodico.FudaaDodicoTacheConnexion; import org.fudaa.fudaa.commun.impl.FudaaImplementation; +import org.fudaa.fudaa.tr.common.TrProjetCommon; /** * Classe principale d'impl\xE9mentation de Refonde. Commune \xE0 l'application et \xE0 * l'applet. @@ -89,10 +91,10 @@ new BuInformationsSoftware(); static { isRefonde_.name= "Refonde"; - isRefonde_.version= "5.15f-beta6"; - isRefonde_.date= "12-Mar-2009"; + isRefonde_.version= "5.15f-rc1"; + isRefonde_.date= "07-Avr-2009"; isRefonde_.rights= "1998-2000 GHN & CETMEF\n2000-2005 DeltaCAD & CETMEF"; - isRefonde_.contact= "pie...@de..."; + isRefonde_.contact= "Pie...@de..."; isRefonde_.license= "GPL2"; isRefonde_.logo= RefondeResource.REFONDE.getIcon("refonde-logo"); isRefonde_.banner= RefondeResource.REFONDE.getIcon("refonde-banner"); @@ -446,6 +448,13 @@ removeInternalFrame(fnMEP_); getMainPanel().getDesktop().repaint(); } + /** + * Suppression du desktop de toutes les fenetres + */ + void clearDeskTopTotal() { + removeInternalFrames(getAllInternalFrames()); + getMainPanel().getDesktop().repaint(); + } // >>> Interface InternalFrameListener --------------------------------------- /** * Une fenetre interne est ferm\xE9e. @@ -657,8 +666,7 @@ if (save) oprEnregistrerProjet(); // Nettoyage du desktop - clearDeskTop(); - removeInternalFrame(fnCalques_); + clearDeskTopTotal(); projet= null; // Selection de la g\xE9om\xE9trie \xE0 ouvrir RefondeDialogPanneau di; @@ -733,7 +741,12 @@ // projet=RefondeProjet.nouveau(fichier); fnCalques_.initialise(projet); addInternalFrame(fnCalques_); - fnCalques_.restaurer(); + //fnCalques_.restaurer(); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + fnCalques_.restaurer(); + } + }); statusBar.setProgression(100); setTitle(projet.getFichierProjet().getPath()); // mnRes_.rafraichir(projet); @@ -817,8 +830,7 @@ oprEnregistrerProjet(); // Nettoyage du desktop - clearDeskTop(); - removeInternalFrame(fnCalques_); + clearDeskTopTotal(); projet= null; oprOuvrirProjet(fichier); @@ -860,8 +872,7 @@ if (save) oprEnregistrerProjet(); // Nettoyage du desktop - clearDeskTop(); - removeInternalFrame(fnCalques_); + clearDeskTopTotal(); projet= null; // Selection du projet \xE0 ouvrir if (diProjet_ == null) { @@ -900,40 +911,19 @@ try { statusBar.setMessage("Ouverture du projet depuis " + _fichier + "..."); statusBar.setProgression(0); - // D\xE9sactivation des actions - // setEnabledForAction("OUVRIRFICHIERS" ,false); - // setEnabledForAction("ENREGISTRERPROJET" ,false); - // setEnabledForAction("ENREGISTRERPROJETSOUS",false); - // setEnabledForAction("ENREGISTRERFICHIERS" ,false); - // setEnabledForAction("PROPRIETESPROJET" ,false); - // setEnabledForAction("MAILLER" ,false); - // setEnabledForAction("SUPPRIMERMAILLAGE" ,false); - // setEnabledForAction("CALCULERANGLES" ,false); - // setEnabledForAction("NOUVELANGLE" ,false); - // setEnabledForAction("MODIFIERANGLE" ,false); - // setEnabledForAction("PARAMETRESCALCUL" ,false); - // setEnabledForAction("CALCULER" ,false); - // setEnabledForAction("EXPORTERREFONDECALCUL",false); - // setEnabledForAction("EXPORTERMAILLAGE" ,false); - // setEnabledForAction("CREERDIGUE" ,false); - // setEnabledForAction("SUPPRIMERDIGUE" ,false); - // setEnabledForAction("MODIFIERPROPMAILLAGE" ,false); - // setEnabledForAction("OPTIMISERLB" ,false); - // setEnabledForAction("NOUVELLEFENETRE" ,false); - // setEnabledForAction("MISEENPAGE" ,false); - // setEnabledForAction("COMBINER" ,false); - // setEnabledForAction("VUE3D" ,false); - // setEnabledForAction("RECENTRERNOEUD" ,false); - // setEnabledForAction("RECENTRERELEMENT" ,false); - // setEnabledForAction("FERMER" ,false); - // clearDeskTop(); + projet= new RefondeProjet(); projet.addMessageListener(this); projet.ouvrir(_fichier); // projet=RefondeProjet.ouvrir(fichier); - fnCalques_.initialise(projet); // Blocage \xE0 corriger dans l'initialisation des calques + fnCalques_.initialise(projet); addInternalFrame(fnCalques_); - fnCalques_.restaurer(); + //fnCalques_.restaurer(); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + fnCalques_.restaurer(); + } + }); statusBar.setProgression(100); setTitle(projet.getFichierProjet().getPath()); updateRecentFiles(_fichier); @@ -946,29 +936,16 @@ fnMEP_.setMiseEnPage(projet.getMiseEnPage()); fnMEP_.getVueCalque().setTaskView(taches_); addInternalFrame(fnMEP_); - fnMEP_.restaurer(); + //fnMEP_.restaurer(); fnMEP_.setClosable(true); + + SwingUtilities.invokeLater(new Runnable() { + public void run() { + fnMEP_.restaurer(); + } + }); } - // Activabilit\xE9 des actions - // setEnabledForAction("OUVRIRFICHIERS" ,true); - // setEnabledForAction("ENREGISTRERPROJET" ,true); - // setEnabledForAction("ENREGISTRERPROJETSOUS",true); - // setEnabledForAction("ENREGISTRERFICHIERS" ,true); - // setEnabledForAction("PROPRIETESPROJET" ,true); - // setEnabledForAction("CALCULERANGLES" ,true); - // setEnabledForAction("NOUVELANGLE" ,true); - // setEnabledForAction("PARAMETRESCALCUL" ,true); - // setEnabledForAction("CALCULER" ,SERVEUR_REFONDE!=null); - // setEnabledForAction("EXPORTERREFONDECALCUL",true); - // setEnabledForAction("EXPORTERMAILLAGE" ,true); - // setEnabledForAction("OPTIMISERLB" ,true); - // setEnabledForAction("MISEENPAGE" ,true); - // setEnabledForAction("COMBINER" ,projet.hasResultats()); - // setEnabledForAction("VUE3D" ,MODULE_3D && projet.hasResultats()); - // setEnabledForAction("NOUVELLEFENETRE" ,projet.estEntierementMaille() && RefondeMaillage.estOptimise(projet.getSuperMaillage())); - // setEnabledForAction("RECENTRERNOEUD" ,projet.getSuperMaillage().noeuds().length!=0); - // setEnabledForAction("RECENTRERELEMENT" ,projet.getSuperMaillage().elements().length!=0); - // setEnabledForAction("FERMER" ,true); + } catch (RefondeTacheInterruptionException _exc) { new BuDialogError(this, isRefonde_, _exc.getMessage()).activate(); projet= null; @@ -1213,9 +1190,9 @@ try { if (save) oprEnregistrerProjet(); - clearDeskTop(); - removeInternalFrame(fnCalques_); + clearDeskTopTotal(); projet= null; + fnInfo_.update(projet); // setEnabledForAction("OUVRIRFICHIERS" ,false); // setEnabledForAction("ENREGISTRERPROJET" ,false); // setEnabledForAction("ENREGISTRERPROJETSOUS",false); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeInformations.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeInformations.java 2009-04-07 13:34:12 UTC (rev 4615) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeInformations.java 2009-04-07 15:55:21 UTC (rev 4616) @@ -47,8 +47,11 @@ * Mise a jour des informations */ public void update(RefondeProjet _projet) { - if (_projet == null) - return; + if (_projet == null) { + laNbNoeuds.setText(""); + laNbElements.setText(""); + return; + } int val; GrMaillageElement mail= RefondeMaillage.creeSuperMaillage( Modified: trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml 2009-04-07 13:34:12 UTC (rev 4615) +++ trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml 2009-04-07 15:55:21 UTC (rev 4616) @@ -17,7 +17,7 @@ --> <info> <appname>Fudaa-Refonde</appname> - <appversion>5.15f-beta6</appversion> + <appversion>5.15f-rc1</appversion> <authors> <author name="Bertrand MARCHAND" email="de...@fu..."/> </authors> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2009-05-12 12:49:44
|
Revision: 4759 http://fudaa.svn.sourceforge.net/fudaa/?rev=4759&view=rev Author: fargeix Date: 2009-05-12 12:49:31 +0000 (Tue, 12 May 2009) Log Message: ----------- Fudaa-Sinavi version 3.1-beta3 Modified Paths: -------------- trunk/fudaa_devel/dodico/idl/code/sinavi3.idl trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeDureesParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeTOUTESAttentesTrajet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeTOUTESDureesParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmesComparaisonSimulation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DataSimulation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Implementation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3JFreeChartCamembert.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelGestionTrajetsBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelSaisieGare.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatGenerationBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteTrajet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsDureesParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3TraduitHoraires.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3VisualiserGares.java trunk/fudaa_devel/fudaa-distrib/sinavi3/build.xml trunk/fudaa_devel/fudaa-distrib/sinavi3/izpack/Unix_shortcutSpec.xml trunk/fudaa_devel/fudaa-distrib/sinavi3/izpack/izpack_fudaa_sinavi3.xml Added Paths: ----------- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/CoupleDistribution.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3GestionResultats.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3JFreeChartGraphe.java trunk/fudaa_devel/fudaa-distrib/sinavi3/fudaa-sinavi3.sh Modified: trunk/fudaa_devel/dodico/idl/code/sinavi3.idl =================================================================== (Binary files differ) Added: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/CoupleDistribution.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/CoupleDistribution.java (rev 0) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/CoupleDistribution.java 2009-05-12 12:49:31 UTC (rev 4759) @@ -0,0 +1,25 @@ +package org.fudaa.fudaa.sinavi3; + +/** + * classe de gestion des donn\xE9es pour les distributions. + * + * @version $Version$ + * @author Mederic FARGEIX + */ +class CoupleDistribution { + double duree_; + int nombre_; + + public CoupleDistribution(final double _duree, final int _nombre) { + + this.duree_ = _duree; + this.nombre_ = _nombre; + } + + public CoupleDistribution(final CoupleDistribution _c) { + + this.duree_ = _c.duree_; + this.nombre_ = _c.nombre_; + } + +} \ No newline at end of file Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java 2009-05-12 12:43:17 UTC (rev 4758) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java 2009-05-12 12:49:31 UTC (rev 4759) @@ -11,10 +11,10 @@ * metode de calcul de la totalit\xE9 des temps d attente dans tous les sens de la simulation. effectue tous ces calculs * des fin du lancement de la simulation * - * @param donnees_ + * @param _donnees * @param nomfichier */ - public static void CalculApresSImu(final Sinavi3DataSimulation donnees_) { + public static void calculApresSimu(final Sinavi3DataSimulation _donnees) { /* * rangements des diff\xE9rents type d'\xE9l\xE9ment dans le tableau: indiceType == 0 =>"chenal" indiceType == 1 =>"ecluse" */ @@ -25,409 +25,29 @@ * fois des gares amont et aval. */ - final SParametresResultatsCompletSimulation resultats = donnees_.params_.ResultatsCompletsSimulation; + final SParametresResultatsCompletSimulation resultats = _donnees.params_.ResultatsCompletsSimulation; int compteurElementsAttente; - boolean trouve; + /******************************************************************************************************************* * CALCUL DES ATTENTES DANS LE SENS AVALANT ******************************************************************************************************************/ // allocation de m\xE9moire pour autant d elements qu il y a eu de saisies - resultats.AttentesTousElementsToutesCategoriesSens1 = new SParametresResultatsAttente[ donnees_.listeEcluse_.listeEcluses_.size() - + donnees_.listeBief_.listeBiefs_.size() - ]; + resultats.AttentesTousElementsToutesCategoriesSens1 = new SParametresResultatsAttente[ _donnees.listeEcluse_.listeEcluses_.size() + + _donnees.listeBief_.listeBiefs_.size() ]; compteurElementsAttente = 0; - trouve = false; // chenal - for (int i = 0; i < donnees_.listeBief_.listeBiefs_.size(); i++) { + for (int i = 0; i < _donnees.listeBief_.listeBiefs_.size(); i++) { resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente] = new SParametresResultatsAttente(); - // type element: il s agit d un quai donc 3 - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].typeElement = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].indiceElement = i; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ - .size()]; - // initialisation de tous les parametres d'attente - for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; - - } - // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de - // cat\xE9gorie - - for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { - if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==0){ //-- test si sens avalant --// - - // on r\xE9cup\xE8re la categorie associee au navire: - final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; - //resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - // pour chaque element du trajet du navire k des qu on trouve el premeir element on se retire - trouve = false; - for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { - // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 0 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { - trouve = true; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - - // on comptabilise les diff\xE9rents temps d'attente - - // attentes d'acces - // attente totale d'acces - double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; - } - - // attentes de marees - // attente totale de marees - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeTotale += attente; - // on incremente nb navires ayant attendu l'Maree si le temps d'Maree est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteMaree++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = attente; - } - - // attentes d'Secu - // attente totale d'Secu - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuTotale += attente; - // on incremente nb navires ayant attendu l'Secu si le temps d'Secu est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteSecu++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = attente; - } - - // attentes d'Occup - // attente totale d'Occup - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupTotale += attente; - // on incremente nb navires ayant attendu l'Occup si le temps d'Occup est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAtenteOccup++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = attente; - } - - // attentes d'Panne - // attente totale d'Panne - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneTotale += attente; - // on incremente nb navires ayant attendu l'Panne si le temps d'Panne est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttentePanne++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = attente; - } - - // attentes d'totale - // attente totale d'acces - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMegaTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteTotale++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = attente; - } - - } - } - - }//fin test sens avalant - }//fin de boucle historique - - for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = 0; - } - } - // incremente l element + calculeAttentesElement(_donnees, resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente], 0, i, 0); compteurElementsAttente++; } - - // ecluse - for (int i = 0; i < donnees_.listeEcluse_.listeEcluses_.size(); i++) { + for (int i = 0; i < _donnees.listeEcluse_.listeEcluses_.size(); i++) { resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente] = new SParametresResultatsAttente(); - // type element: il s agit d une ecluse donc 1 - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].typeElement = 1; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].indiceElement = i; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ - .size()]; - // initialisation de tous les parametres d'attente - for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; - - } - // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de - // cat\xE9gorie - - for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { - if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==0){ //-- test si sens avalant --// - // on r\xE9cup\xE8re la categorie associee au navire: - final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; - //resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - trouve = false; - // pour chaque element du trajet du navire k - for (int e = 0; e < donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { - // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 1 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { - trouve = true; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - - // on comptabilise les diff\xE9rents temps d'attente - - // attentes d'acces - // attente totale d'acces - double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; - } - - // attentes de marees - // attente totale de marees - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeTotale += attente; - // on incremente nb navires ayant attendu l'Maree si le temps d'Maree est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteMaree++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = attente; - } - - // attentes d'Secu - // attente totale d'Secu - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuTotale += attente; - // on incremente nb navires ayant attendu l'Secu si le temps d'Secu est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteSecu++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = attente; - } - - // attentes d'Occup - // attente totale d'Occup - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupTotale += attente; - // on incremente nb navires ayant attendu l'Occup si le temps d'Occup est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAtenteOccup++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = attente; - } - - // attentes d'Panne - // attente totale d'Panne - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneTotale += attente; - // on incremente nb navires ayant attendu l'Panne si le temps d'Panne est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttentePanne++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = attente; - } - - // attentes d'totale - // attente totale d'acces - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMegaTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteTotale++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = attente; - } - - } - } - - } - }//fin boucle historique - - for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = 0; - } - } - // incremente l element + calculeAttentesElement(_donnees, resultats.AttentesTousElementsToutesCategoriesSens1[compteurElementsAttente], 0, i, 1); compteurElementsAttente++; } @@ -435,814 +55,55 @@ * CALCUL DES ATTENTES DANS LE SENS MONTANT ******************************************************************************************************************/ // allocation de m\xE9moire pour autant d elements qu il y a eu de saisies - resultats.AttentesTousElementsToutesCategoriesSens2 = new SParametresResultatsAttente[ donnees_.listeEcluse_.listeEcluses_.size() - + donnees_.listeBief_.listeBiefs_.size()]; + resultats.AttentesTousElementsToutesCategoriesSens2 = new SParametresResultatsAttente[ _donnees.listeEcluse_.listeEcluses_.size() + + _donnees.listeBief_.listeBiefs_.size()]; compteurElementsAttente = 0; - trouve = false; // chenal - for (int i = 0; i < donnees_.listeBief_.listeBiefs_.size(); i++) { + for (int i = 0; i < _donnees.listeBief_.listeBiefs_.size(); i++) { resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente] = new SParametresResultatsAttente(); - // type element: il s agit d un quai donc 3 - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].typeElement = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].indiceElement = i; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ - .size()]; - // initialisation de tous les parametres d'attente - for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; - - } - // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de - // cat\xE9gorie - - for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { - if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==1){ //-- test si sens avalant --// - // on r\xE9cup\xE8re la categorie associee au navire: - final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; - //resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - // pour chaque element du trajet du navire k des qu on trouve el premeir element on se retire - trouve = false; - for (int e =0; e<donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours && !trouve; e++) { - // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 0 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { - trouve = true; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - - // on comptabilise les diff\xE9rents temps d'attente - - // attentes d'acces - // attente totale d'acces - double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; - } - - // attentes de marees - // attente totale de marees - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeTotale += attente; - // on incremente nb navires ayant attendu l'Maree si le temps d'Maree est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteMaree++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = attente; - } - - // attentes d'Secu - // attente totale d'Secu - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuTotale += attente; - // on incremente nb navires ayant attendu l'Secu si le temps d'Secu est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteSecu++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = attente; - } - - // attentes d'Occup - // attente totale d'Occup - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupTotale += attente; - // on incremente nb navires ayant attendu l'Occup si le temps d'Occup est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAtenteOccup++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = attente; - } - - // attentes d'Panne - // attente totale d'Panne - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attentePanneTotale += attente; - // on incremente nb navires ayant attendu l'Panne si le temps d'Panne est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttentePanne++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = attente; - } - - // attentes d'totale - // attente totale d'acces - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indispo - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].occupation - + donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].secu; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMegaTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteTotale++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = attente; - } - - } - } - - } - }//fin historique boucle - - for (int n = 0; n < donnees_.listeBateaux_.listeNavires_.size(); n++) { - if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteMareeMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteSecuMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteOccupMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attentePanneMini = 0; - } - if (resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini == 9999999) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteTotaleMini = 0; - } - } - // incremente l element + calculeAttentesElement(_donnees, resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente], 1, i, 0); compteurElementsAttente++; } - - // ecluse - for (int i = 0; i < donnees_.listeEcluse_.listeEcluses_.size(); i++) { + for (int i = 0; i < _donnees.listeEcluse_.listeEcluses_.size(); i++) { resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente] = new SParametresResultatsAttente(); - // type element: il s agit d un quai donc 3 - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].typeElement = 1; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].indiceElement = i; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories = new SParametresResultatsAttenteCategorie[donnees_.listeBateaux_.listeNavires_ - .size()]; - // initialisation de tous les parametres d'attente - for (int k = 0; k < donnees_.listeBateaux_.listeNavires_.size(); k++) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k] = new SParametresResultatsAttenteCategorie(); - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nombreNaviresTotal = 0; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteAcces = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteAccesMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteMaree = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMareeMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteSecu = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteSecuMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAtenteOccup = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteOccupMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attentePanneTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttentePanne = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attentePanneMini = 9999999; - - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteMegaTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].nbNaviresAttenteTotale = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMaxi = 0; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[k].attenteTotaleMini = 9999999; - - } - // boucle sur l historique et pour chaque ligne, on remplit les donn\xE9es dans la bonne case grace a l indice de - // cat\xE9gorie - - for (int k = 0; k < donnees_.listeResultatsSimu_.nombreNavires; k++) { - if(donnees_.listeResultatsSimu_.listeEvenements[k].sens==1){ //-- test si sens avalant --// - // on r\xE9cup\xE8re la categorie associee au navire: - final int n = donnees_.listeResultatsSimu_.listeEvenements[k].categorie; - //resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - trouve = false; - // pour chaque element du trajet du navire k - for (int e =0; e<donnees_.listeResultatsSimu_.listeEvenements[k].NbElemtnsParcours&& !trouve; e++) { - // si l'\xE9l\xE9ment du trajet est equivalent a celui de l'\xE9l\xE9ment recherch\xE9 - if (donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].typeElement == 1 - && donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].indiceElement == i) { - trouve = true; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nombreNaviresTotal++; - - // on comptabilise les diff\xE9rents temps d'attente - - // attentes d'acces - // attente totale d'acces - double attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].acces; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesTotale += attente; - // on incremente nb navires ayant attendu l'acces si le temps d'acces est non nul: - if (attente != 0) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].nbNaviresAttenteAcces++; - } - // on teste si l'attente est minimale ou maximale: - if (attente > resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMaxi = attente; - } - if (attente < resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini) { - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].attenteAccesMini = attente; - } - - // attentes de marees - // attente totale de marees - attente = donnees_.listeResultatsSimu_.listeEvenements[k].tableauTrajet[e].marees; - resultats.AttentesTousElementsToutesCategoriesSens2[compteurElementsAttente].tableauAttenteCategories[n].... [truncated message content] |
From: <fa...@us...> - 2009-05-20 14:16:48
|
Revision: 4794 http://fudaa.svn.sourceforge.net/fudaa/?rev=4794&view=rev Author: fargeix Date: 2009-05-20 13:34:33 +0000 (Wed, 20 May 2009) Log Message: ----------- Correction 2 bugs Fudaa-Refonde : - Pb impression de post-traitements - Pb d?\195?\169placement d'objet lorsqu'aucun objet s?\195?\169lectionn?\195?\169 Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueDeplacementInteraction.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleMiseEnPage.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml Added Paths: ----------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/ressource/text.gif Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueDeplacementInteraction.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueDeplacementInteraction.java 2009-05-19 22:01:33 UTC (rev 4793) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueDeplacementInteraction.java 2009-05-20 13:34:33 UTC (rev 4794) @@ -98,6 +98,9 @@ if (_evt.getModifiers() != InputEvent.BUTTON1_MASK) { return; } + if (selection_ == null) { + return; + } final GrPoint pointCour = new GrPoint(_evt.getX(), _evt.getY(), 0.).applique(getVersReel()); for (int i = 0; i < selection_.nombre(); i++) { final GrContour o = selection_.renvoie(i); Added: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/ressource/text.gif =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/ressource/text.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleMiseEnPage.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleMiseEnPage.java 2009-05-19 22:01:33 UTC (rev 4793) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeFilleMiseEnPage.java 2009-05-20 13:34:33 UTC (rev 4794) @@ -426,10 +426,16 @@ cqPg.setVisible(false); if (cqSlVisible) cqSl.setVisible(false); + // On enl\xE8ve le caract\xE8re "rapide" du calque de fenetre, si il est visible + boolean cqFnsVisible = cqFns_.isVisible(); + boolean cqFnsRapide = cqFns_.isRapide(); + if (cqFnsRapide && cqFnsVisible) + cqFns_.setRapide(false); // Sauvegarde du repere de la fen\xEAtre avant modification pour trac\xE9 dans // l'espace de l'imprimante. double[][] rp= getVueCalque().getRepere(); double[][] rpSav= new double[rp.length][rp.length != 0 ? rp[0].length : 0]; + int[] sizeSav= new int[] {getVueCalque().getWidth(), getVueCalque().getHeight()}; for (int i= 0; i < rp.length; i++) System.arraycopy(rp[i], 0, rpSav[i], 0, rp[i].length); // Modification de l'espace d'affichage pour revenir dans celui de @@ -437,14 +443,16 @@ RepereEvent re= new RepereEvent(this, false); re.ajouteTransformation(RepereEvent.IDENT, 0, false); re.ajouteTransformation(RepereEvent.ZOOM, ImpToMM, RepereEvent.ABSOLU); - re.ajouteTransformation(RepereEvent.TRANS_Y, + /*re.ajouteTransformation(RepereEvent.TRANS_Y, //// pgmm_.getHeight()/ImpToMM-getVueCalque().getHeight(),RepereEvent.ABSOLU); // _pf.getHeight()/ImpToMM-getVueCalque().getHeight(),RepereEvent.ABSOLU); - _pf.getHeight() - getVueCalque().getHeight(), RepereEvent.ABSOLU); + _pf.getHeight() - getVueCalque().getHeight(), RepereEvent.ABSOLU);*/ getVueCalque().repereModifie(re); + getVueCalque().setSize((int) _pf.getWidth(), (int) _pf.getHeight()); // Impression getVueCalque().print(_g); // Restauration de l'espace d'affichage. + getVueCalque().setSize(sizeSav[0], sizeSav[1]); getVueCalque().setRepere(rpSav); // On remet en l'\xE9tat de visibilit\xE9 les calques de mise page et des objets // s\xE9lectionn\xE9s @@ -452,6 +460,8 @@ cqPg.setVisible(true); if (cqSlVisible) cqSl.setVisible(true); + if (cqFnsRapide && cqFnsVisible) + cqFns_.setRapide(true); System.out.println("Passage en mode rapide"); return Printable.PAGE_EXISTS; } // <<< Interface Printable --------------------------------------------------- Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-05-19 22:01:33 UTC (rev 4793) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java 2009-05-20 13:34:33 UTC (rev 4794) @@ -91,8 +91,8 @@ new BuInformationsSoftware(); static { isRefonde_.name= "Refonde"; - isRefonde_.version= "5.15f-rc3"; - isRefonde_.date= "04-Mai-2009"; + isRefonde_.version= "5.15f-rc4"; + isRefonde_.date= "20-Mai-2009"; isRefonde_.rights= "1998-2000 GHN & CETMEF\n2000-2005 DeltaCAD & CETMEF"; isRefonde_.contact= "Pie...@de..."; isRefonde_.license= "GPL2"; @@ -2274,9 +2274,17 @@ if (fnMEP_ != null) removeInternalFrame(fnMEP_); fnMEP_= new RefondeFilleMiseEnPage(this, ac_); + + //Mise aux proportions de la page + int surf= fnMEP_.getHeight() * fnMEP_.getWidth(); + double proport= pfNew.getWidth() / pfNew.getHeight(); + int width= (int) Math.sqrt(surf * proport); + fnMEP_.setSize(width, (int) (width / proport)); + fnMEP_.setMiseEnPage(projet.getMiseEnPage()); fnMEP_.getVueCalque().setTaskView(taches_); addInternalFrame(fnMEP_); + //fnMEP_.getVueCalque().setSize((int) pf.getImageableWidth(), (int) pf.getImageableHeight()); fnMEP_.restaurer(); fnMEP_.setClosable(true); } Modified: trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml 2009-05-19 22:01:33 UTC (rev 4793) +++ trunk/fudaa_devel/fudaa-distrib/refonde/izpack/izpack_fudaa_refonde.xml 2009-05-20 13:34:33 UTC (rev 4794) @@ -17,7 +17,7 @@ --> <info> <appname>Fudaa-Refonde</appname> - <appversion>5.15f-rc3</appversion> + <appversion>5.15f-rc4</appversion> <authors> <author name="Bertrand MARCHAND" email="de...@fu..."/> </authors> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2009-07-21 09:52:03
|
Revision: 4962 http://fudaa.svn.sourceforge.net/fudaa/?rev=4962&view=rev Author: deniger Date: 2009-07-21 09:51:56 +0000 (Tue, 21 Jul 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenuItem.java trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuVfsOperations.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeGifEncoder.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeImageEncoder.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeIntHashtable.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeJpegEncoder.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmePpmEncoder.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/CtuluGif89EncoderImmediateSave.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/DirectGif89Frame.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Gif89Encoder.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Gif89Frame.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/GifColorTable.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/IndexGif89Frame.java trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Put.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeGraphiqueDialog.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeLib.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeMobilisationDefenseResultats.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/diapre/DiapreImplementation.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarDialogPictureViewer.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarLib.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi/SinaviGraphiqueResultat.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjetsManagerFille.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/ Removed Paths: ------------- trunk/fudaa_devel/ctulu/src/com/memoire/acme/ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java Modified: trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenuItem.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenuItem.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenuItem.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -13,17 +13,12 @@ import java.awt.Graphics; import java.awt.Point; -import java.awt.event.ActionListener; import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.List; import javax.swing.Action; import javax.swing.Icon; import javax.swing.JMenuItem; -import org.fudaa.ctulu.CtuluLibGenerator; - /** * Like JMenuItem but with better management of icons. */ @@ -55,13 +50,7 @@ if(clone.getAccelerator()!=null) this.setAccelerator(clone.getAccelerator()); - if(clone.id_!=null) - this.id_=clone.id_; - else { - String gene= CtuluLibGenerator.getInstance().deliverUniqueStringId(); - this.id_=gene; - clone.id_=gene; - } + this.setId(clone.getId()); } public BuMenuItem(BuIcon _icon) @@ -138,9 +127,9 @@ BuMenuItem clone=(BuMenuItem)obj; - if(clone.id_==null || this.id_==null) + if(clone.getId()==null || this.getId()==null) return false; - if(!clone.id_.equals(this.id_)) + if(!clone.getId().equals(this.getId())) return false; // // if(clone.getText()!=null && this.getText()!=null ) @@ -176,4 +165,18 @@ if(r==null) r=new Point(getWidth(),0); return r; } + +/** + * @param id_ the id_ to set + */ +public void setId(String id_) { + this.id_ = id_; } + +/** + * @return the id_ + */ +public String getId() { + return id_; +} +} Modified: trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuVfsOperations.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuVfsOperations.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuVfsOperations.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -18,95 +18,72 @@ import javax.swing.JOptionPane; -import org.fudaa.ctulu.CtuluRemoveContentDirectory; import com.memoire.fu.FuComparator; import com.memoire.fu.FuLog; import com.memoire.vfs.VfsFile; import com.memoire.vfs.VfsOperations; -public class BuVfsOperations - implements VfsOperations -{ - //private static final boolean DEBUG=Bu.DEBUG&&true; - private static final boolean TRACE=Bu.TRACE&&true; +public class BuVfsOperations implements VfsOperations { + // private static final boolean DEBUG=Bu.DEBUG&&true; + private static final boolean TRACE = Bu.TRACE && true; protected BuInformationsSoftware il_; - public BuVfsOperations(BuInformationsSoftware _il) - { - il_=_il; + public BuVfsOperations(BuInformationsSoftware _il) { + il_ = _il; } - public final void renameFile(File _o) - { - final VfsFile f=VfsFile.ensureVfsFile(_o); - if(f==null) return; - BuLib.invokeOutsideLater(new Runnable() - { - public void run() - { + public final void renameFile(File _o) { + final VfsFile f = VfsFile.ensureVfsFile(_o); + if (f == null) return; + BuLib.invokeOutsideLater(new Runnable() { + public void run() { renameFile0(f); } }); } - public final void copyFile(File _src,File _dst) - { - final VfsFile src=VfsFile.ensureVfsFile(_src); - final VfsFile dst=VfsFile.ensureVfsFile(_dst); + public final void copyFile(File _src, File _dst) { + final VfsFile src = VfsFile.ensureVfsFile(_src); + final VfsFile dst = VfsFile.ensureVfsFile(_dst); - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: copy "+src+" to "+dst); + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: copy " + src + " to " + dst); - BuLib.invokeOutsideLater(new Runnable() - { - public void run() - { - copyFile0(src,dst); + BuLib.invokeOutsideLater(new Runnable() { + public void run() { + copyFile0(src, dst); } }); } - public final void moveFiles(final File[] _o,final File _dir) - { - BuLib.invokeOutsideLater(new Runnable() - { - public void run() - { - moveOrCopyFiles0(_o,_dir,false,true); + public final void moveFiles(final File[] _o, final File _dir) { + BuLib.invokeOutsideLater(new Runnable() { + public void run() { + moveOrCopyFiles0(_o, _dir, false, true); } }); } - public final void copyFiles(final File[] _o,final File _dir) - { - BuLib.invokeOutsideLater(new Runnable() - { - public void run() - { - moveOrCopyFiles0(_o,_dir,true,true); + public final void copyFiles(final File[] _o, final File _dir) { + BuLib.invokeOutsideLater(new Runnable() { + public void run() { + moveOrCopyFiles0(_o, _dir, true, true); } }); } - public final void linkFiles(final File[] _o,final File _dir) - { - BuLib.invokeOutsideLater(new Runnable() - { - public void run() - { - linkFiles0(_o,_dir); + public final void linkFiles(final File[] _o, final File _dir) { + BuLib.invokeOutsideLater(new Runnable() { + public void run() { + linkFiles0(_o, _dir); } }); } - public final void deleteFiles(final File[] _o) - { - BuLib.invokeOutsideLater(new Runnable() - { - public void run() - { + public final void deleteFiles(final File[] _o) { + BuLib.invokeOutsideLater(new Runnable() { + public void run() { deleteFiles0(_o); } }); @@ -114,27 +91,18 @@ // Impl. - protected boolean renameFile0(VfsFile _f) - { - String type=(_f.isDirectory() ? "r\xE9pertoire" : "fichier"); + protected boolean renameFile0(VfsFile _f) { + String type = (_f.isDirectory() ? "r\xE9pertoire" : "fichier"); - BuDialogInput d=new BuDialogInput - (null,il_,_("Renommer"), - _("Nouveau nom du "+type+":"), - _f.getName()); + BuDialogInput d = new BuDialogInput(null, il_, _("Renommer"), _("Nouveau nom du " + type + ":"), _f.getName()); - if(d.activate()==JOptionPane.OK_OPTION) - { - String name =d.getValue(); - VfsFile target=_f.getParentVfsFile().createChild(name); - - if(!_f.renameTo(target)) - { - new BuDialogError - (null,null, - _("Impossible de renommer le "+type+" {0} en {1}", - new Object[] { _f.getName(),name })) - .activate(); + if (d.activate() == JOptionPane.OK_OPTION) { + String name = d.getValue(); + VfsFile target = _f.getParentVfsFile().createChild(name); + + if (!_f.renameTo(target)) { + new BuDialogError(null, null, _("Impossible de renommer le " + type + " {0} en {1}", new Object[] { + _f.getName(), name })).activate(); return false; } } @@ -142,161 +110,137 @@ return true; } - protected boolean copyFile0(VfsFile _src,VfsFile _dst) - { - if((_src==null)||!_src.exists()) - { - new BuDialogError - (null,il_,_("Le fichier {0} n'existe pas",_src)).activate(); + protected boolean copyFile0(VfsFile _src, VfsFile _dst) { + if ((_src == null) || !_src.exists()) { + new BuDialogError(null, il_, _("Le fichier {0} n'existe pas", _src)).activate(); return false; } - if(_src.isDirectory()) - { - if((_dst==null)||(_dst.exists()&&!_dst.isDirectory())) - { - new BuDialogError - (null,il_,_("La destination {0} n'est pas un r\xE9pertoire",_dst)).activate(); + if (_src.isDirectory()) { + if ((_dst == null) || (_dst.exists() && !_dst.isDirectory())) { + new BuDialogError(null, il_, _("La destination {0} n'est pas un r\xE9pertoire", _dst)).activate(); return false; } - if(!_dst.exists()) - { - if(!_dst.mkdirs()) - { - new BuDialogError - (null,il_, - _("Le r\xE9pertoire {0} n'a pu \xEAtre cr\xE9e")).activate(); + if (!_dst.exists()) { + if (!_dst.mkdirs()) { + new BuDialogError(null, il_, _("Le r\xE9pertoire {0} n'a pu \xEAtre cr\xE9e")).activate(); return false; } } - moveOrCopyFiles0(_src.listFiles(),_dst,true,false); + moveOrCopyFiles0(_src.listFiles(), _dst, true, false); return true; } - if((_dst==null)||_dst.isDirectory()) - { - new BuDialogError - (null,il_,_("La destination {0} est un r\xE9pertoire",_dst)).activate(); + if ((_dst == null) || _dst.isDirectory()) { + new BuDialogError(null, il_, _("La destination {0} est un r\xE9pertoire", _dst)).activate(); return false; } - if(_dst.exists()) - { - if(new BuDialogConfirmation - (null,il_, - _("Remplacer le fichier {0} ?",_dst)) - .activate()!=JOptionPane.YES_OPTION) - return false; + if (_dst.exists()) { + if (new BuDialogConfirmation(null, il_, _("Remplacer le fichier {0} ?", _dst)).activate() != JOptionPane.YES_OPTION) return false; } - boolean failed=false; - try - { - if(TRACE&&FuLog.isTrace()) - FuLog.trace - ("BVO: destination "+_dst.getAbsolutePath()); - - InputStream fis=_src.getInputStream(); - OutputStream fos=_dst.getOutputStream(); - int c=0; - while(true) - { - c=fis.read(); - if(c==-1) break; + boolean failed = false; + try { + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: destination " + _dst.getAbsolutePath()); + + InputStream fis = _src.getInputStream(); + OutputStream fos = _dst.getOutputStream(); + int c = 0; + while (true) { + c = fis.read(); + if (c == -1) break; fos.write(c); } fis.close(); fos.close(); + } catch (Exception ex) { + FuLog.error("BVO: I/O #127", ex); + failed = true; } - catch(Exception ex) - { - FuLog.error("BVO: I/O #127",ex); - failed=true; - } - if(failed) - { - new BuDialogError - (null,il_, - _("Le fichier {0} n'a pu \xEAtre copi\xE9 dans {1}", - new Object[] { _src,_dst })).activate(); + if (failed) { + new BuDialogError(null, il_, _("Le fichier {0} n'a pu \xEAtre copi\xE9 dans {1}", new Object[] { _src, _dst })) + .activate(); return false; } return true; } - protected void linkFiles0(File[] _o, File _dir) - { - new BuDialogError - (null,il_,_("La cr\xE9ation de liens n'est pas disponible")).activate(); + protected void linkFiles0(File[] _o, File _dir) { + new BuDialogError(null, il_, _("La cr\xE9ation de liens n'est pas disponible")).activate(); } - protected void deleteFiles0(File[] _os) - { - File[] _o=new File[_os.length]; - System.arraycopy(_os,0, _o , 0, _o.length); - Arrays.sort(_o,FuComparator.REVERSE_STRING_COMPARATOR); - String to=""; - int no=0; + public static boolean deleteDir(final File _f) { + if (_f == null) { return false; } + final File[] files = _f.listFiles(); + if (files != null) { + for (int i = files.length - 1; i >= 0; i--) { + if (files[i].isFile()) { + try { + files[i].delete(); + } catch (final RuntimeException _evt) { + FuLog.error(_evt); - for(int i=0;i<_o.length;i++) - { - if(_o[i]!=null) - { - VfsFile src=VfsFile.ensureVfsFile(_o[i]); - if((src!=null)&&src.exists()) - { - String s=src.getName(); - no++; to+=" "+s+"\n"; - } + } + } else { + deleteDir(files[i]); + } } + } + return _f.delete(); + } - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: "+no+" files"); + protected void deleteFiles0(File[] _os) { + File[] _o = new File[_os.length]; + System.arraycopy(_os, 0, _o, 0, _o.length); + Arrays.sort(_o, FuComparator.REVERSE_STRING_COMPARATOR); + String to = ""; + int no = 0; - if((no>0)&& - (new BuDialogConfirmation - (null,il_, - _("D\xE9truire ces {0} fichiers ?",no)+"\n"+to) - .activate()==JOptionPane.YES_OPTION)) - { - for(int i=0;i<_o.length;i++) - { - if(_o[i]!=null) - { - VfsFile src=VfsFile.ensureVfsFile(_o[i]); - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: src "+src+" "+src.exists()); - if((src!=null)&&src.exists()) - { - //String s=src.getName(); + for (int i = 0; i < _o.length; i++) { + if (_o[i] != null) { + VfsFile src = VfsFile.ensureVfsFile(_o[i]); + if ((src != null) && src.exists()) { + String s = src.getName(); + no++; + to += " " + s + "\n"; + } + } + } - boolean failed=false; - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: delete "+src); - try { - if(src.isDirectory()){ - try{ - CtuluRemoveContentDirectory.contentDirectoryRemover(src); - failed=!src.delete(); - //failed=false; - }catch(Exception e){ - failed=true; - } - } - else - failed=!src.delete(); - + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: " + no + " files"); + + if ((no > 0) + && (new BuDialogConfirmation(null, il_, _("D\xE9truire ces {0} fichiers ?", no) + "\n" + to).activate() == JOptionPane.YES_OPTION)) { + for (int i = 0; i < _o.length; i++) { + if (_o[i] != null) { + VfsFile src = VfsFile.ensureVfsFile(_o[i]); + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: src " + src + " " + src.exists()); + if ((src != null) && src.exists()) { + // String s=src.getName(); + + boolean failed = false; + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: delete " + src); + try { + if (src.isDirectory()) { + try { + deleteDir(src); + failed = !src.delete(); + // failed=false; + } catch (Exception e) { + failed = true; + } + } else failed = !src.delete(); + + } catch (Exception ex) { + failed = true; } - catch(Exception ex) { failed=true; } - if(failed) - { - new BuDialogError - (null,il_,_("Le fichier {0} n'a pu \xEAtre d\xE9truit",src)) - .activate(); + if (failed) { + new BuDialogError(null, il_, _("Le fichier {0} n'a pu \xEAtre d\xE9truit", src)).activate(); } } } @@ -304,185 +248,122 @@ } } - protected void moveOrCopyFiles0(File[] _o,File _dir,boolean _copy,boolean _confirm) - { - VfsFile dir=VfsFile.ensureVfsFile(_dir); - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: "+(_copy ? "copy" : "move")+" "+ - _o.length+" files to "+dir); + protected void moveOrCopyFiles0(File[] _o, File _dir, boolean _copy, boolean _confirm) { + VfsFile dir = VfsFile.ensureVfsFile(_dir); + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: " + (_copy ? "copy" : "move") + " " + _o.length + " files to " + + dir); - if((dir==null)||!dir.exists()) - { - new BuDialogError - (null,il_,_("Le repertoire {0} n'existe pas",dir)).activate(); + if ((dir == null) || !dir.exists()) { + new BuDialogError(null, il_, _("Le repertoire {0} n'existe pas", dir)).activate(); return; } - if(!dir.canWrite()) - { - new BuDialogError - (null,il_,_("Le repertoire {0} est en lecture seule",dir)).activate(); + if (!dir.canWrite()) { + new BuDialogError(null, il_, _("Le repertoire {0} est en lecture seule", dir)).activate(); return; } - String to=""; - String te=""; - int no=0; - int ne=0; + String to = ""; + String te = ""; + int no = 0; + int ne = 0; - for(int i=0;i<_o.length;i++) - { - if(_o[i]!=null) - { - VfsFile src=VfsFile.ensureVfsFile(_o[i]); - //FuLog.debug("FILE="+src); - if((src!=null)&&src.exists()) - { - //FuLog.debug("BVO: dst="+cdir+" src="+src.getClass()); - //if(src.getClass()!=cdir) _copy=true; - - String s=src.getName(); - VfsFile dst=dir.createChild(s); - if(dst.exists()) { ne++; te+=" "+s+"\n"; } - else { no++; to+=" "+s+"\n"; } - } + for (int i = 0; i < _o.length; i++) { + if (_o[i] != null) { + VfsFile src = VfsFile.ensureVfsFile(_o[i]); + // FuLog.debug("FILE="+src); + if ((src != null) && src.exists()) { + // FuLog.debug("BVO: dst="+cdir+" src="+src.getClass()); + // if(src.getClass()!=cdir) _copy=true; + + String s = src.getName(); + VfsFile dst = dir.createChild(s); + if (dst.exists()) { + ne++; + te += " " + s + "\n"; + } else { + no++; + to += " " + s + "\n"; + } + } } } - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: "+no+" files"); + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: " + no + " files"); - if(_confirm&& - (no>0)&& - (new BuDialogConfirmation - (null,il_, - _(_copy - ? "Copier ces {0} fichiers dans {1} ?" - : "D\xE9placer ces {0} fichiers dans {1} ?", - new Object[] { ""+no,dir }) - +"\n"+to) - .activate()==JOptionPane.YES_OPTION)) - { - for(int i=0;i<_o.length;i++) - { - if(_o[i]!=null) - { - VfsFile src=VfsFile.ensureVfsFile(_o[i]); - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: src "+src+" "+src.exists()); - if((src!=null)&&src.exists()) - { - String s=src.getName(); - VfsFile dst=dir.createChild(s); - //new File(_dir,s); - if(TRACE&&FuLog.isTrace()) - FuLog.trace - ("BVO: dst "+dst+" "+dst.exists()+" =="+dst.equals(src)); - if(!dst.exists()&&!dst.equals(src)) - { - if(_copy) - { - //if(src.isDirectory()) - //{ - copyFile0(src,dst); - //} + if (_confirm + && (no > 0) + && (new BuDialogConfirmation(null, il_, _(_copy ? "Copier ces {0} fichiers dans {1} ?" + : "D\xE9placer ces {0} fichiers dans {1} ?", new Object[] { "" + no, dir }) + + "\n" + to).activate() == JOptionPane.YES_OPTION)) { + for (int i = 0; i < _o.length; i++) { + if (_o[i] != null) { + VfsFile src = VfsFile.ensureVfsFile(_o[i]); + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: src " + src + " " + src.exists()); + if ((src != null) && src.exists()) { + String s = src.getName(); + VfsFile dst = dir.createChild(s); + // new File(_dir,s); + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: dst " + dst + " " + dst.exists() + " ==" + dst.equals(src)); + if (!dst.exists() && !dst.equals(src)) { + if (_copy) { + // if(src.isDirectory()) + // { + copyFile0(src, dst); + // } /* - else - { - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: copy "+src+" to "+dst); - boolean failed=false; - try - { - if(TRACE&&FuLog.isTrace()) FuLog.trace - ("BVO: destination "+dst.getAbsolutePath()); - - InputStream fis=src.getInputStream(); - OutputStream fos=dst.getOutputStream(); - int c=0; - int n=0; - while(true) - { - c=fis.read(); - if(c==-1) break; - fos.write(c); - } - - fis.close(); - fos.close(); - } - catch(Exception ex) - { - FuLog.error("BVO: I/O #145",ex); - failed=true; - } - if(failed) - { - new BuDialogError - (null,il_, - _("Le fichier {0} n'a pu \xEAtre copi\xE9 dans {1}", - new Object[] { src,dir })).activate(); - //if(dst.exists()) dst.delete(); - } - } - */ - } - else - { - boolean failed=false; - if(TRACE&&FuLog.isTrace()) - FuLog.trace("BVO: rename "+src+" to "+dst); - try { failed=!src.renameTo(dst); } - catch(Exception ex) { failed=true; } - if(failed) - { - new BuDialogError - (null,il_, - _("Le fichier {0} n'a pu \xEAtre d\xE9plac\xE9 dans {1}", - new Object[] { src,dir })).activate(); - //if(dst.exists()) dst.delete(); - } - } - } - else - { - te+=s+"\n"; - ne++; - } - } - } + * else { if(TRACE&&FuLog.isTrace()) FuLog.trace("BVO: copy "+src+" to "+dst); boolean failed=false; try + * { if(TRACE&&FuLog.isTrace()) FuLog.trace ("BVO: destination "+dst.getAbsolutePath()); + * + * InputStream fis=src.getInputStream(); OutputStream fos=dst.getOutputStream(); int c=0; int n=0; + * while(true) { c=fis.read(); if(c==-1) break; fos.write(c); } + * + * fis.close(); fos.close(); } catch(Exception ex) { FuLog.error("BVO: I/O #145",ex); failed=true; } + * if(failed) { new BuDialogError (null,il_, _("Le fichier {0} n'a pu \xEAtre copi\xE9 dans {1}", new Object[] + * { src,dir })).activate(); //if(dst.exists()) dst.delete(); } } + */ + } else { + boolean failed = false; + if (TRACE && FuLog.isTrace()) FuLog.trace("BVO: rename " + src + " to " + dst); + try { + failed = !src.renameTo(dst); + } catch (Exception ex) { + failed = true; + } + if (failed) { + new BuDialogError(null, il_, _("Le fichier {0} n'a pu \xEAtre d\xE9plac\xE9 dans {1}", + new Object[] { src, dir })).activate(); + // if(dst.exists()) dst.delete(); + } + } + } else { + te += s + "\n"; + ne++; + } + } + } } } - if(ne>0) - new BuDialogError - (null,il_, - _(_copy - ? "Les {0} fichiers suivants n'ont pas \xE9t\xE9 copi\xE9s "+ - "car ils existent d\xE9j\xE0 dans {1}" - : "Les {0} fichiers suivants n'ont pas \xE9t\xE9 d\xE9plac\xE9s "+ - "car ils existent d\xE9j\xE0 dans {1}", - new Object[] { ""+ne,dir })+ - " :\n"+te).activate(); + if (ne > 0) new BuDialogError(null, il_, _(_copy ? "Les {0} fichiers suivants n'ont pas \xE9t\xE9 copi\xE9s " + + "car ils existent d\xE9j\xE0 dans {1}" : "Les {0} fichiers suivants n'ont pas \xE9t\xE9 d\xE9plac\xE9s " + + "car ils existent d\xE9j\xE0 dans {1}", new Object[] { "" + ne, dir }) + + " :\n" + te).activate(); } - public final String _(final String _s) - { + public final String _(final String _s) { return BuResource.BU.getString(_s); } - public final String _(final String _s,final Object[] _p) - { - return BuResource.BU.getString(_s,_p); + public final String _(final String _s, final Object[] _p) { + return BuResource.BU.getString(_s, _p); } - public final String _(final String _s,final Object _p) - { - return BuResource.BU.getString(_s,new Object[] { _p }); + public final String _(final String _s, final Object _p) { + return BuResource.BU.getString(_s, new Object[] { _p }); } - public final String _(final String _s,final int _p) - { - return BuResource.BU.getString(_s,new Object[] { ""+_p }); + public final String _(final String _s, final int _p) { + return BuResource.BU.getString(_s, new Object[] { "" + _p }); } } Deleted: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java =================================================================== --- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluRemoveContentDirectory.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,101 +0,0 @@ -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(); - - - - // 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]); - listing[i].delete(); - } - } - - - } - - - } - - - - private void removeDirectoryContentRecursivly(File ToDel) { - - File[] listing2 = ToDel.listFiles(); - - if(listing2==null || listing2.length==0){ - ToDel.delete(); - 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]); - } - } - - //-- on finit par supprimer le directory, sinon loop infinie garantie! --// - ToDel.delete(); - - } - - - - - -} Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeGifEncoder.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/AcmeGifEncoder.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeGifEncoder.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,6 +1,6 @@ -package com.memoire.acme; +package org.fudaa.ctulu.gif; // AcmeGifEncoder - write out an image as a GIF // Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeImageEncoder.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/AcmeImageEncoder.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeImageEncoder.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,6 +1,6 @@ -package com.memoire.acme; +package org.fudaa.ctulu.gif; // AcmeImageEncoder - abstract class for writing out an image // Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeIntHashtable.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/AcmeIntHashtable.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeIntHashtable.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,6 +1,6 @@ -package com.memoire.acme; +package org.fudaa.ctulu.gif; // AcmeIntHashtable - a Hashtable that uses ints as the keys // This is 90% based on JavaSoft's java.util.Hashtable. Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeJpegEncoder.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/AcmeJpegEncoder.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmeJpegEncoder.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,6 +1,6 @@ -package com.memoire.acme; +package org.fudaa.ctulu.gif; // AcmeJpegEncoder - write out an image as a JPEG // Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmePpmEncoder.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/AcmePpmEncoder.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/AcmePpmEncoder.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,6 +1,6 @@ -package com.memoire.acme; +package org.fudaa.ctulu.gif; // AcmePpmEncoder - write out an image as a PPM // Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/CtuluGif89EncoderImmediateSave.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/CtuluGif89EncoderImmediateSave.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/CtuluGif89EncoderImmediateSave.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,7 +1,7 @@ //****************************************************************************** // Gif89Encoder.java //****************************************************************************** -package com.memoire.acme; +package org.fudaa.ctulu.gif; import java.awt.Dimension; import java.awt.Image; Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/DirectGif89Frame.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/DirectGif89Frame.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/DirectGif89Frame.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,7 +1,7 @@ //****************************************************************************** // DirectGif89Frame.java //****************************************************************************** -package com.memoire.acme; +package org.fudaa.ctulu.gif; import java.awt.Image; import java.awt.image.PixelGrabber; Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Gif89Encoder.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/Gif89Encoder.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Gif89Encoder.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,7 +1,7 @@ //****************************************************************************** // Gif89Encoder.java //****************************************************************************** -package com.memoire.acme; +package org.fudaa.ctulu.gif; import java.awt.Color; import java.awt.Dimension; Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Gif89Frame.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/Gif89Frame.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Gif89Frame.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,7 +1,7 @@ //****************************************************************************** // Gif89Frame.java //****************************************************************************** -package com.memoire.acme; +package org.fudaa.ctulu.gif; import java.awt.Point; import java.io.IOException; Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/GifColorTable.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/GifColorTable.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/GifColorTable.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -5,7 +5,7 @@ * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ -package com.memoire.acme; +package org.fudaa.ctulu.gif; import java.awt.Color; import java.io.IOException; Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/IndexGif89Frame.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/IndexGif89Frame.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/IndexGif89Frame.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,7 +1,7 @@ //****************************************************************************** // IndexGif89Frame.java //****************************************************************************** -package com.memoire.acme; +package org.fudaa.ctulu.gif; //============================================================================== /** Instances of this Gif89Frame subclass are constructed from bitmaps in the Modified: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Put.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/acme/Put.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gif/Put.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -1,7 +1,7 @@ //****************************************************************************** // Put.java //****************************************************************************** -package com.memoire.acme; +package org.fudaa.ctulu.gif; import java.io.IOException; import java.io.OutputStream; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -13,9 +13,9 @@ import java.io.FileOutputStream; import java.io.IOException; -import com.memoire.acme.CtuluGif89EncoderImmediateSave; import com.memoire.fu.FuLog; +import org.fudaa.ctulu.gif.CtuluGif89EncoderImmediateSave; import org.fudaa.ctulu.image.CtuluImageProducer; import org.fudaa.ctulu.image.CtuluLibImage; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -26,9 +26,9 @@ import org.fudaa.ctulu.CtuluLibFile; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.fudaa.commun.projet.FudaaProjet; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.BuButton; import com.memoire.bu.BuCommonInterface; import com.memoire.bu.BuLabel; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeGraphiqueDialog.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeGraphiqueDialog.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeGraphiqueDialog.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -17,9 +17,9 @@ import javax.swing.JComponent; import javax.swing.JOptionPane; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.ebli.graphe.BGraphe; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.BuButton; import com.memoire.bu.BuCommonInterface; import com.memoire.bu.BuDialog; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeLib.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeLib.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeLib.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -25,6 +25,7 @@ import javax.swing.table.DefaultTableModel; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.dodico.corba.albe.SAction; import org.fudaa.dodico.corba.albe.SCoefficientsPartiels; import org.fudaa.dodico.corba.albe.SCombinaisonMateriaux; @@ -46,7 +47,6 @@ import org.fudaa.ebli.graphe.Lecteur; import org.fudaa.fudaa.commun.projet.FudaaFiltreFichier; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.BuButton; import com.memoire.bu.BuCommonInterface; import com.memoire.bu.BuDialogConfirmation; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeMobilisationDefenseResultats.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeMobilisationDefenseResultats.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/albe/AlbeMobilisationDefenseResultats.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -19,11 +19,11 @@ import javax.swing.JOptionPane; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.ebli.graphe.BGraphe; import org.fudaa.ebli.graphe.Graphe; import org.fudaa.ebli.graphe.Lecteur; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.BuCommonInterface; import com.memoire.bu.BuLabelMultiLine; import com.memoire.bu.BuPanel; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/diapre/DiapreImplementation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/diapre/DiapreImplementation.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/diapre/DiapreImplementation.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -24,10 +24,10 @@ import javax.swing.JOptionPane; import javax.swing.event.InternalFrameEvent; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.*; import com.memoire.fu.FuLib; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.dodico.corba.diapre.ICalculDiapre; import org.fudaa.dodico.corba.diapre.ICalculDiapreHelper; import org.fudaa.dodico.corba.diapre.IParametresDiapre; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarDialogPictureViewer.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarDialogPictureViewer.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarDialogPictureViewer.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -23,10 +23,10 @@ import javax.swing.JPanel; import javax.swing.border.EmptyBorder; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.BuCommonInterface; import com.memoire.bu.BuDialog; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.ebli.graphe.BGraphe; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarLib.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarLib.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/oscar/OscarLib.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -48,11 +48,11 @@ import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.*; import com.memoire.fu.FuLib; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.dodico.corba.oscar.*; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi/SinaviGraphiqueResultat.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi/SinaviGraphiqueResultat.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi/SinaviGraphiqueResultat.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -19,11 +19,11 @@ import javax.swing.JComponent; -import com.memoire.acme.AcmeGifEncoder; import com.memoire.bu.BuGridLayout; import com.memoire.bu.BuLabel; import com.memoire.bu.BuPanel; +import org.fudaa.ctulu.gif.AcmeGifEncoder; import org.fudaa.ebli.graphe.Axe; import org.fudaa.ebli.graphe.BGraphe; import org.fudaa.ebli.graphe.Contrainte; Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjetsManagerFille.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjetsManagerFille.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjetsManagerFille.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -16,6 +16,7 @@ import javax.swing.event.ListSelectionListener; import javax.swing.tree.TreePath; +import org.fudaa.ctulu.CtuluLibGenerator; import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.fudaa.tr.common.TrResource; import org.fudaa.fudaa.tr.post.actions.TrPostActionOpenSrc; @@ -180,8 +181,11 @@ int indexSource=projet_.listeSrc_.indexOf(src); - for(BuMenuItem item:this.projet_.getlisteSousMenuProjets_().get(indexSource)) + for(BuMenuItem item:this.projet_.getlisteSousMenuProjets_().get(indexSource)){ + if(item.getId()==null) + item.setId(CtuluLibGenerator.getInstance().deliverUniqueStringId()); popup.add(new BuMenuItem(item)); + } //-- affichage au bon endroit --// popup.show(listProjets_, x, y); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2009-07-21 08:39:50 UTC (rev 4961) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2009-07-21 09:51:56 UTC (rev 4962) @@ -23,7 +23,6 @@ import org.fudaa.ctulu.CtuluAnalyze; import org.fudaa.ctulu.CtuluLibFile; -import org.fudaa.ctulu.CtuluRemoveContentDirectory; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ctulu.gui.CtuluFileChooser; import org.fudaa.ctulu.gui.CtuluLibSwing; @@ -159,7 +158,7 @@ fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre projet")); fileChooser.setAcceptAllFileFilterUsed(false); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - //fileChooser.addChoosableFileFilter(new TrPostFileFilter.DirectoryPOSTFilter()); + // fileChooser.addChoosableFileFilter(new TrPostFileFilter.DirectoryPOSTFilter()); // -- par defaut on choisis le nom du fichier resultat + .POST --// @@ -195,44 +194,42 @@ if (projet_ != null) { // initialiser le saveas dans le meme rep // fileChooser.setSelectedFile(projet_); } - File conteneurProjet =null; - - int reponse = fileChooser.showSaveDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); + File conteneurProjet = null; + + int reponse = fileChooser.showSaveDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); if (reponse == JFileChooser.APPROVE_OPTION) { - conteneurProjet = fileChooser.getSelectedFile(); - }else - return false; - + conteneurProjet = fileChooser.getSelectedFile(); + } else return false; - if(conteneurProjet.exists() && !conteneurProjet.isDirectory()){ - - trprojet_.impl_.error(TrResource.getS("Erreur, le fichier choisit doit \xEAtre un r\xE9pertoire")); - return false; + if (conteneurProjet.exists() && !conteneurProjet.isDirectory()) { + + trprojet_.impl_.error(TrResource.getS("Erreur, le fichier choisit doit \xEAtre un r\xE9pertoire")); + return false; } - // -- test si le fichier choisit par l'utilisateur existe djea, si oui. demander confirmation d'ecrasement --// - if (conteneurProjet.exists()) { - - boolean resp = trprojet_.impl_.question("Fichier " + conteneurProjet.getName() + " existant", "Le fichier " - + conteneurProjet.getName() + " existe d\xE9j\xE0.\n Voulez-vous l'\xE9craser ?"); - if (!resp) return false; - } + // -- test si le fichier choisit par l'utilisateur existe djea, si oui. demander confirmation d'ecrasement --// + if (conteneurProjet.exists()) { - 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 + boolean resp = trprojet_.impl_.question("Fichier " + conteneurProjet.getName() + " existant", "Le fichier " + + conteneurProjet.getName() + " existe d\xE9j\xE0.\n Voulez-vous l'\xE9craser ?"); + if (!resp) return false; + } - if (projet_.isDirectory()) { - return true; - } else { - ui_.error(EbliResource.EBLI.getString("Impossible de cr\xE9er le r\xE9pertoire")); - return false; - } + 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 - } else if (projet_ != null) + if (projet_.isDirectory()) { + return true; + } else { + ui_.error(EbliResource.EBLI.getString("Impossible de cr\xE9er le r\xE9pertoire")); + return false; + } + + } else if (projet_ != null) // -- on sauvegarde au meme emplacement --// return true; else return false; @@ -873,7 +870,7 @@ File fileVar = new File(pathVariables); if (fileVar.isDirectory()) { - CtuluRemoveContentDirectory.contentDirectoryRemover(fileVar); + CtuluLibFile.deleteDir(fileVar); } else fileVar.mkdir(); } catch (final Exception e) { @@ -1132,7 +1129,7 @@ File fichierGraphes = new File(pathGraphes); if (fichierGraphes.isDirectory()) { // -- on le nettoie --// - CtuluRemoveContentDirectory.contentDirectoryRemover(fichierGraphes); + CtuluLibFile.deleteDir(fichierGraphes); } else fichierGraphes.mkdir(); } catch (final Exception e) { @@ -1145,7 +1142,7 @@ File fichierCalques = new File(pathCalques); if (fichierCalques.isDirectory()) { // -- on le nettoie --// - CtuluRemoveContentDirectory.contentDirectoryRemover(fichierCalques); + CtuluLibFile.deleteDir(fichierCalques); } else fichierCalques.mkdir(); } catch (final Exception e) { @@ -1158,7 +1155,7 @@ File fichierText = new File(pathText); if (fichierText.isDirectory()) { // -- on le nettoie --// - CtuluRemoveContentDirectory.contentDirectoryRemover(fichierText); + CtuluLibFile.deleteDir(fichierText); } else fichierText.mkdir(); } catch (final Exception e) { @@ -1223,20 +1220,21 @@ for (final Widget child : widget.getChildren()) { final EbliNode node = (EbliNode) scene.findObject(child); // ecriture de l objet - if (node != null){ + if (node != null) { - out.writeObject(new EbliWidgetSerializeXml(node, parametres)); - listeNomsComposants.add(new EbliWidgetSerializeXml.CoupleNomId(node.getTitle(), node.getWidget().getId())); + out.writeObject(new EbliWidgetSerializeXml(node, parametres)); + listeNomsComposants + .add(new EbliWidgetSerializeXml.CoupleNomId(node.getTitle(), node.getWidget().getId())); } } } else { final 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())); + if (node != null) { + + out.writeObject(new EbliWidgetSerializeXml(node, parametres)); + listeNomsComposants.add(new EbliWidgetSerializeXml.CoupleNomId(node.getTitle(), node.getWidget().getId())); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2009-07-22 23:10:20
|
Revision: 4990 http://fudaa.svn.sourceforge.net/fudaa/?rev=4990&view=rev Author: deniger Date: 2009-07-22 23:10:17 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/ant-properties.xml trunk/fudaa_devel/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResult.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResultInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/rubar/H2dRubarDonneesBrutes.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/RefluxSollicitationFortranAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarSEMWriterGISAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRubarDonneesBrutesAdapter.java Added Paths: ----------- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/collection/CollectionPointDataDoubleInterface.java Removed Paths: ------------- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISCollectionPointDataDoubleInterface.java Modified: trunk/fudaa_devel/ant-properties.xml =================================================================== --- trunk/fudaa_devel/ant-properties.xml 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/ant-properties.xml 2009-07-22 23:10:17 UTC (rev 4990) @@ -60,7 +60,6 @@ <property file="${projet.dir}/ant.default.properties" /> <property name="java3d.jar.dir" location="${java.ext.dirs}" /> - <property name="jmf.jar.dir" location="${java.ext.dirs}" /> <property name="ctulu.javac.patterns" value="" /> <property name="ebli.javac.patterns" value="" /> @@ -110,9 +109,6 @@ <fileset dir="${java3d.jar.dir}"> <include name="*.jar" /> </fileset> - <fileset dir="${jmf.jar.dir}"> - <include name="jmf.jar" /> - </fileset> </path> <path id="ctulu.classpath.id"> <path refid="lib.classpath.id" /> Copied: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/collection/CollectionPointDataDoubleInterface.java (from rev 4909, trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISCollectionPointDataDoubleInterface.java) =================================================================== --- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/collection/CollectionPointDataDoubleInterface.java (rev 0) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/collection/CollectionPointDataDoubleInterface.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -0,0 +1,35 @@ +/* + * @creation 1 oct. 2004 + * @modification $Date: 2007-01-10 08:58:48 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.ctulu.collection; + + +/** + * @author Fred Deniger + * @version $Id: GISCollectionPointDataDoubleInterface.java,v 1.5 2007-01-10 08:58:48 deniger Exp $ + */ +public interface CollectionPointDataDoubleInterface { + + /** + * @return le nombre de points + */ + int getNbPoint(); + + double getX(int _i); + + double getY(int _i); + + double getZ(int _i); + + int getNbValues(); + + // MNTPoint getNewPoint(int _i); + double getDoubleValue(int _idxValue,int _idxPt); + + void fill(int _idxValue,CtuluListDouble _m); + +} \ No newline at end of file Deleted: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISCollectionPointDataDoubleInterface.java =================================================================== --- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISCollectionPointDataDoubleInterface.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISCollectionPointDataDoubleInterface.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -1,36 +0,0 @@ -/* - * @creation 1 oct. 2004 - * @modification $Date: 2007-01-10 08:58:48 $ - * @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 org.fudaa.ctulu.collection.CtuluListDouble; - -/** - * @author Fred Deniger - * @version $Id: GISCollectionPointDataDoubleInterface.java,v 1.5 2007-01-10 08:58:48 deniger Exp $ - */ -public interface GISCollectionPointDataDoubleInterface { - - /** - * @return le nombre de points - */ - int getNbPoint(); - - double getX(int _i); - - double getY(int _i); - - double getZ(int _i); - - int getNbValues(); - - // MNTPoint getNewPoint(int _i); - double getDoubleValue(int _idxValue,int _idxPt); - - void fill(int _idxValue,CtuluListDouble _m); - -} \ No newline at end of file Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt 2009-07-22 23:10:17 UTC (rev 4990) @@ -1,3 +1,4 @@ +Mixte=Mixed Filtre strict=Strict filter L'\xE9l\xE9ment {0} est mal d\xE9fini=The element {0} is not set correctly La d\xE9finition des noeuds fronti\xE8res ou des conditions limites est fausse=The defintion for the boundary nodes or for the boundary conditions is wrong. Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResult.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResult.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResult.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -8,10 +8,10 @@ package org.fudaa.dodico.fortran; import org.fudaa.ctulu.CtuluNumberFormatI; +import org.fudaa.ctulu.collection.CollectionPointDataDoubleInterface; import org.fudaa.ctulu.collection.CtuluCollectionDouble; import org.fudaa.ctulu.collection.CtuluCollectionDoubleAbstract; import org.fudaa.ctulu.collection.CtuluListDouble; -import org.fudaa.ctulu.gis.GISCollectionPointDataDoubleInterface; /** * @author Fred Deniger @@ -19,7 +19,7 @@ */ public class FortranDoubleReaderResult implements FortranDoubleReaderResultInterface { - final class Adapter implements GISCollectionPointDataDoubleInterface { + final class Adapter implements CollectionPointDataDoubleInterface { Adapter() { @@ -86,7 +86,7 @@ */ public double[][] r_; - public GISCollectionPointDataDoubleInterface createXYValuesInterface() { + public CollectionPointDataDoubleInterface createXYValuesInterface() { if (getNbColonne() < 2) { return null; } Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResultInterface.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResultInterface.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranDoubleReaderResultInterface.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -8,8 +8,8 @@ package org.fudaa.dodico.fortran; import org.fudaa.ctulu.CtuluNumberFormatI; +import org.fudaa.ctulu.collection.CollectionPointDataDoubleInterface; import org.fudaa.ctulu.collection.CtuluCollectionDouble; -import org.fudaa.ctulu.gis.GISCollectionPointDataDoubleInterface; /** * @author Fred Deniger @@ -32,6 +32,6 @@ * * @return l'interface pour des donn\xE9es geo */ - GISCollectionPointDataDoubleInterface createXYValuesInterface(); + CollectionPointDataDoubleInterface createXYValuesInterface(); } Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/rubar/H2dRubarDonneesBrutes.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/rubar/H2dRubarDonneesBrutes.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/rubar/H2dRubarDonneesBrutes.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -18,13 +18,7 @@ import org.fudaa.ctulu.CtuluNumberFormatI; import org.fudaa.ctulu.CtuluNumberFormater; import org.fudaa.ctulu.CtuluPermanentList; -import org.fudaa.ctulu.collection.CtuluArrayDouble; -import org.fudaa.ctulu.collection.CtuluArrayDoubleUnique; -import org.fudaa.ctulu.collection.CtuluCollectionDouble; -import org.fudaa.ctulu.collection.CtuluCollectionDoubleEdit; -import org.fudaa.ctulu.collection.CtuluCollectionDoubleUnique; -import org.fudaa.ctulu.collection.CtuluContainerModelDouble; -import org.fudaa.ctulu.collection.CtuluListDouble; +import org.fudaa.ctulu.collection.*; import org.fudaa.ctulu.gis.*; import org.fudaa.ctulu.gis.GISReprojectInterpolateurI.DoubleTarget; @@ -50,7 +44,7 @@ class NuageFileModel implements FortranDoubleReaderResultInterface { - public GISCollectionPointDataDoubleInterface createXYValuesInterface() { + public CollectionPointDataDoubleInterface createXYValuesInterface() { return nuage_; } @@ -370,7 +364,7 @@ * @version $Id: H2dRubarDonneesBrutes.java,v 1.32 2007-05-04 13:46:38 deniger Exp $ */ public class NuagePoint extends GISZoneCollectionPoint implements CtuluContainerModelDouble, - GISCollectionPointDataDoubleInterface { + CollectionPointDataDoubleInterface { public int getNbValues() { return attr_ == null ? 0 : attr_.length; @@ -436,7 +430,7 @@ super.initAttributes(_att); } - protected void initFromAndKeepSameNbValues(final GISCollectionPointDataDoubleInterface _i) { + protected void initFromAndKeepSameNbValues(final CollectionPointDataDoubleInterface _i) { if (_i == null) { return; } @@ -735,7 +729,7 @@ return r; } - protected NuagePoint createNuagePoint(final GISCollectionPointDataDoubleInterface _init) { + protected NuagePoint createNuagePoint(final CollectionPointDataDoubleInterface _init) { final NuagePoint r = new NuagePoint(_init == null ? 30 : _init.getNbPoint()); if (_init != null) { r.initFromAndKeepSameNbValues(_init); @@ -905,7 +899,7 @@ * @param _inter l'interface servant a initialiser les donn\xE9es * @return true si donn\xE9es initialisees */ - public boolean initDonneesBrutes(final GISCollectionPointDataDoubleInterface _inter) { + public boolean initDonneesBrutes(final CollectionPointDataDoubleInterface _inter) { if (_inter == null) { return false; } Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionFileFormat.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionFileFormat.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionFileFormat.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -17,10 +17,8 @@ import org.fudaa.ctulu.fileformat.FileFormatUnique; import org.fudaa.ctulu.fileformat.FileReadOperationAbstract; import org.fudaa.ctulu.fileformat.FileWriteOperationAbstract; - import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.fichiers.FileFormatSoftware; -import org.fudaa.dodico.h2d.type.H2dFileFormatType; /** * @author deniger @@ -96,7 +94,7 @@ id_ = "CSV"; description_ = DodicoLib.getS("Fichier csv"); software_ = FileFormatSoftware.REFLUX_IS; - type_ = H2dFileFormatType.COURBE_TRANSITOIRE; + type_ = nom_; } } \ No newline at end of file Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -11,7 +11,6 @@ import gnu.trove.TDoubleHashSet; import gnu.trove.TIntArrayList; -import java.io.File; import java.text.DecimalFormat; import java.util.Arrays; import java.util.HashMap; @@ -23,9 +22,8 @@ import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibArray; +import org.fudaa.dodico.commun.DodicoLib; -import org.fudaa.dodico.h2d.resource.H2dResource; - /** * Une evolution reguliere qui n'utilise pas les objets corba. * @@ -158,7 +156,7 @@ /** * utilise pour preciser qu'une selection d'evolution possede des evolutions differentes. */ - public static final EvolutionReguliereAbstract MIXTE = new EvolutionReguliere(H2dResource.getS("Mixte")); + public static final EvolutionReguliereAbstract MIXTE = new EvolutionReguliere(DodicoLib.getS("Mixte")); /** * Modifie r en ajoutant _nb points sur la droite (_xmin,_ymin) (xmax,ymax). Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/RefluxSollicitationFortranAdapter.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/RefluxSollicitationFortranAdapter.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/RefluxSollicitationFortranAdapter.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -9,8 +9,8 @@ import org.fudaa.ctulu.CtuluNumberFormatFortran; import org.fudaa.ctulu.CtuluNumberFormatI; +import org.fudaa.ctulu.collection.CollectionPointDataDoubleInterface; import org.fudaa.ctulu.collection.CtuluCollectionDouble; -import org.fudaa.ctulu.gis.GISCollectionPointDataDoubleInterface; import org.fudaa.dodico.fortran.FortranDoubleReaderResultInterface; import org.fudaa.dodico.h2d.reflux.H2dRefluxNodalPropertiesMng; @@ -29,7 +29,7 @@ } - public GISCollectionPointDataDoubleInterface createXYValuesInterface() { + public CollectionPointDataDoubleInterface createXYValuesInterface() { return null; } Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarSEMWriterGISAdapter.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarSEMWriterGISAdapter.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarSEMWriterGISAdapter.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -10,8 +10,8 @@ import org.fudaa.ctulu.CtuluNumberFormatFortran; import org.fudaa.ctulu.CtuluNumberFormatI; import org.fudaa.ctulu.collection.CDoubleArrayList; +import org.fudaa.ctulu.collection.CollectionPointDataDoubleInterface; import org.fudaa.ctulu.collection.CtuluCollectionDouble; -import org.fudaa.ctulu.gis.GISCollectionPointDataDoubleInterface; import org.fudaa.ctulu.gis.GISDataModel; import org.fudaa.ctulu.gis.GISMultiPoint; import org.fudaa.dodico.fortran.FortranDoubleReaderResultInterface; @@ -56,7 +56,7 @@ } } - public GISCollectionPointDataDoubleInterface createXYValuesInterface() { + public CollectionPointDataDoubleInterface createXYValuesInterface() { throw new IllegalAccessError("This method shouldn't be accessed"); } Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -156,6 +156,16 @@ } + + public static void main(String[] args) { + try { + ICalculSinavi3 newInstance = (ICalculSinavi3)Class.forName("org.fudaa.dodico.sinavi3.DCalculSinavi3").newInstance(); + System.err.println(newInstance); + } catch (Exception e) { + e.printStackTrace(); + } + + } } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRubarDonneesBrutesAdapter.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRubarDonneesBrutesAdapter.java 2009-07-22 22:19:56 UTC (rev 4989) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRubarDonneesBrutesAdapter.java 2009-07-22 23:10:17 UTC (rev 4990) @@ -10,8 +10,8 @@ import java.io.IOException; import org.fudaa.ctulu.CtuluNumberFormatI; +import org.fudaa.ctulu.collection.CollectionPointDataDoubleInterface; import org.fudaa.ctulu.collection.CtuluCollectionDouble; -import org.fudaa.ctulu.gis.GISCollectionPointDataDoubleInterface; import org.fudaa.dodico.ef.EfGridData; import org.fudaa.dodico.fortran.FortranDoubleReaderResult; import org.fudaa.dodico.fortran.FortranDoubleReaderResultInterface; @@ -60,7 +60,7 @@ isElt_ = data_.isElementVar(_vars); } - public GISCollectionPointDataDoubleInterface createXYValuesInterface() { + public CollectionPointDataDoubleInterface createXYValuesInterface() { return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2009-09-10 11:42:07
|
Revision: 5101 http://fudaa.svn.sourceforge.net/fudaa/?rev=5101&view=rev Author: deniger Date: 2009-09-10 11:41:57 +0000 (Thu, 10 Sep 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenu.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliNodeDefault.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetPlage.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreator.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorArrowEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorConnectionWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorDblFleche.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFleche.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorImage.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorShape.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextLabel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetGroupCreator.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetGroupSerializeXml.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java Added Paths: ----------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetHtml.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithView.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWrappedLine.java Removed Paths: ------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManagerOLD.java Modified: trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenu.java =================================================================== --- trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenu.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ctulu/src/com/memoire/bu/BuMenu.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -323,9 +323,9 @@ } /** - * Retourne l'index de l'item de commande donn�e. + * Retourne l'index de l'item de commande donn\xE9. * @param _cmd Le nom de la commande. - * @return L'index, ou -1 si non trouv�. + * @return L'index, ou -1 si non trouv\xE9. */ public int indexOf(String _cmd) { return indexOf(this,_cmd); @@ -335,8 +335,9 @@ if (_cmd==null) return -1; for (int i=0; i<_menu.getItemCount(); i++) { - if (!(_menu.getItem(i) instanceof JMenuItem)) continue; - if (_cmd.equals(_menu.getItem(i).getActionCommand())) return i; + +// if (!(_menu.getItem(i) instanceof JMenuItem)) continue; + if (_menu.getItem(i)!=null && _cmd.equals(_menu.getItem(i).getActionCommand())) return i; } return -1; } @@ -512,11 +513,11 @@ public static BuMenu buildFileMenu() { BuMenu r=new BuMenu(__("Fichier"),"MENU_FICHIER"); - r.addMenuItem(__("Cr�er") ,"CREER" ,false,KeyEvent.VK_N); + r.addMenuItem(__("Cr\xE9er") ,"CREER" ,false,KeyEvent.VK_N); r.addMenuItem(__("Ouvrir...") ,"OUVRIR" ,false,KeyEvent.VK_O); r.addSubMenu(new BuMenuRecentFiles(),true); - r.addMenuItem(__("Propri�t�s...") ,"PROPRIETE" ,false); + r.addMenuItem(__("Propri\xE9t\xE9s...") ,"PROPRIETE" ,false); //r.addSeparator(); r.addMenuItem(__("Enregistrer") ,"ENREGISTRER" ,false,KeyEvent.VK_S); @@ -530,7 +531,7 @@ r.addSeparator(); r.addMenuItem(__("Imprimer...") ,"IMPRIMER" ,false,KeyEvent.VK_P); - r.addMenuItem(__("Pr�visualiser") ,"PREVISUALISER" ,false); + r.addMenuItem(__("Pr\xE9visualiser") ,"PREVISUALISER" ,false); r.addMenuItem(__("Mise en page...") ,"MISEENPAGE" ,false); r.addSeparator(); @@ -542,7 +543,7 @@ public static BuMenu buildEditionMenu() { BuMenu r=new BuMenu(__("Edition"),"MENU_EDITION"); - r.addMenuItem(__("D�faire") ,"DEFAIRE" ,false,KeyEvent.VK_Z); + r.addMenuItem(__("D\xE9faire") ,"DEFAIRE" ,false,KeyEvent.VK_Z); r.addMenuItem(__("Refaire") ,"REFAIRE" ,false) .setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK)); // normalement Ctrl-Y @@ -554,17 +555,17 @@ r.addMenuItem(__("Dupliquer") ,"DUPLIQUER" ,false) .setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK)); r.addSeparator(); - r.addMenuItem(__("Tout s�lectionner") ,"TOUTSELECTIONNER" ,false,KeyEvent.VK_A); + r.addMenuItem(__("Tout s\xE9lectionner") ,"TOUTSELECTIONNER" ,false,KeyEvent.VK_A); r.addMenuItem(__("Rechercher...") ,"RECHERCHER" ,false,KeyEvent.VK_F); r.addMenuItem(__("Remplacer...") ,"REMPLACER" ,false,KeyEvent.VK_R); r.addSeparator(); - r.addMenuItem(__("Pr�f�rences") ,"PREFERENCE" ,false,KeyEvent.VK_F2); + r.addMenuItem(__("Pr\xE9f\xE9rences") ,"PREFERENCE" ,false,KeyEvent.VK_F2); return r; } public static BuMenu buildMetalThemeMenu() { - BuMenu r=new BuMenu(__("Th�mes pour Metal"),"THEME_METAL"); + BuMenu r=new BuMenu(__("Th\xE8mes pour Metal"),"THEME_METAL"); BuMetalCustomTheme[] themes=BuMetalCustomTheme.getList(); for(int i=0;i<themes.length;i++) @@ -584,7 +585,7 @@ public static BuMenu buildSlafThemeMenu() { - BuMenu r=new BuMenu(__("Th�mes pour Slaf"),"THEME_SLAF"); + BuMenu r=new BuMenu(__("Th\xE8mes pour Slaf"),"THEME_SLAF"); BuSlafCustomTheme[] themes=BuSlafCustomTheme.getList(); for(int i=0;i<themes.length;i++) @@ -659,7 +660,7 @@ public static BuMenu buildWindowMenu() { - BuMenu r=new BuMenu(__("Fen�tres"),"MENU_FENETRES"); + BuMenu r=new BuMenu(__("Fen\xEAtres"),"MENU_FENETRES"); /* if(!FuLib.isJDistroRunning()) r.addSubMenu(buildLookAndFeelMenu(),true);*/ @@ -678,25 +679,25 @@ sm=r; r.addSeparator(__("Organisation")); } - sm.addMenuItem (__("Plein �cran") ,"PLEINECRAN" ,true); + sm.addMenuItem (__("Plein \xE9cran") ,"PLEINECRAN" ,true); sm.addMenuItem (__("Cascade") ,"CASCADE" ,true); sm.addMenuItem (__("Mosaique") ,"MOSAIQUE" ,true); - sm.addMenuItem (__("Ranger les ic�nes") ,"RANGERICONES" ,true); + sm.addMenuItem (__("Ranger les ic\xF4nes") ,"RANGERICONES" ,true); sm.addMenuItem (__("Ranger les palettes") ,"RANGERPALETTES" ,true); sm.addMenuItem (__("Echanger les colonnes"),"ECHANGER_COLONNES" ,true); if(BuPreferences.BU.getBooleanProperty("menu.short",false)) { - sm=new BuMenu(__("El�ments"),"VISIBLE_ELEMENTS"); + sm=new BuMenu(__("El\xE9ments"),"VISIBLE_ELEMENTS"); r.addSubMenu(sm,true); } else { sm=r; - r.addSeparator(__("El�ments")); + r.addSeparator(__("El\xE9ments")); } sm.addCheckBox - (__("Outils sp�cifiques"),"VISIBLE_SPECIFICBAR",true ,true ); + (__("Outils sp\xE9cifiques"),"VISIBLE_SPECIFICBAR",true ,true ); sm.addCheckBox (__("Colonne gauche") ,"VISIBLE_LEFTCOLUMN" ,true ,true ) .setAccelerator @@ -706,7 +707,7 @@ .setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_F12,InputEvent.ALT_MASK)); sm.addCheckBox - (__("Barre d'�tat") ,"VISIBLE_STATUSBAR" ,true ,true ); + (__("Barre d'\xE9tat") ,"VISIBLE_STATUSBAR" ,true ,true ); return r; } @@ -733,8 +734,8 @@ sm.addMenuItem (__("Page principale") ,"AIDE_INDEX" ,true ,KeyEvent.VK_F1); sm.addMenuItem (__("Pointeur") ,"POINTEURAIDE" ,true ) .setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1,InputEvent.SHIFT_MASK)); - sm.addMenuItem (__("Index alphab�tique") ,"INDEX_ALPHA" ,true ); - sm.addMenuItem (__("Index th�matique") ,"INDEX_THEMA" ,true ); + sm.addMenuItem (__("Index alphab\xE9tique") ,"INDEX_ALPHA" ,true ); + sm.addMenuItem (__("Index th\xE9matique") ,"INDEX_THEMA" ,true ); if(BuPreferences.BU.getBooleanProperty("menu.short",false)) { @@ -762,7 +763,7 @@ } sm.addMenuItem (__("Site WWW") ,"WWW_ACCUEIL" ,true ); // sm.addMenuItem (__("Site FTP"),"FTP_ACCUEIL",true ); - sm.addMenuItem (__("Mise � jour") ,"MAJ" ,false); + sm.addMenuItem (__("Mise \xE0 jour") ,"MAJ" ,false); // sm.addMenuItem (__("Bogue...") ,"WWW_BOGUE" ,false); // sm.addMenuItem (__("Achat...") ,"WWW_ACHAT" ,false); Deleted: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -1,55 +0,0 @@ -/** - * Licence GPL - * Copyright Genesis - */ -package org.fudaa.ebli.visuallibrary; - -import java.awt.Dimension; -import java.awt.Rectangle; - -import javax.swing.JLabel; -import javax.swing.plaf.basic.BasicHTML; -import javax.swing.text.View; - -import org.netbeans.api.visual.widget.Scene; -import org.netbeans.api.visual.widget.Widget; - -/** - * @author deniger - */ -public class EbliHtmlWidget extends Widget { - - View view; - JLabel c = new JLabel(); - - protected EbliHtmlWidget(Scene scene, String html) { - super(scene); - view = BasicHTML.createHTMLView(c, html); - super.setCheckClipping(true); - } - - public void setHtml(String html) { - view = BasicHTML.createHTMLView(c, html); - } - - @Override - protected Rectangle calculateClientArea() { - Rectangle rec = new Rectangle(); - // the preferred size is here - rec.height = (int) view.getPreferredSpan(View.Y_AXIS); - rec.width = (int) view.getPreferredSpan(View.X_AXIS); - return rec; - } - - /** - * - */ - @Override - protected void paintWidget() { - Rectangle clientArea = getClientArea(); - System.err.println(clientArea); - c.setPreferredSize(new Dimension(clientArea.width, clientArea.height)); - view.paint(getGraphics(), clientArea); - } - -} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliNodeDefault.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliNodeDefault.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliNodeDefault.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -80,7 +80,6 @@ } public boolean isMovable() { - // TODO Auto-generated method stub return (hasWidget() && getPreferedLocation() != null && getWidget().getBounds() != null); } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -52,10 +52,6 @@ .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); alignWithMoveAction = EbliWidgetActionFactory.createMoveAction(sp, sp); - // alignWithResizeAction = - // ActionFactory.createAlignWithResizeAction(scene_.getVisu(), - // scene_.getInteractionLayer(), ActionFactory - // .createDefaultAlignWithMoveDecorator(), false); alignWithResizeAction = EbliWidgetActionFactory.createAlignWithProportionnalResizeAction(scene_.getVisu(), scene_ .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -444,8 +444,8 @@ parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_, parent.getController() .isProportional())); } else { - if(lookFeel!=null && getController()!=null) - setBorder(lookFeel.getBorder(_newState, getController().canResize_, getController().isProportional())); + if (lookFeel != null && getController() != null) setBorder(lookFeel.getBorder(_newState, + getController().canResize_, getController().isProportional())); } } @@ -483,11 +483,19 @@ this.isGroup = isGroup; } - public void setId_(final String id_) { + public void setId(final String id_) { this.id_ = id_; } /** + * Methode \xE0 utiliser permettant de prendre en compte des undo/redo + * @param _visible + */ + public final void setWidgetVisible(boolean _visible) { + getParentBordure().changeVisible(_visible, true); + } + + /** * Methode directement appelee apres modification des parametres renvoye par le getproperty. Ajoute les anciens * parametres dans la commande undo/redo. */ @@ -560,34 +568,32 @@ public void setUseBorder(final boolean _useBorder) { useBorder_ = _useBorder; } - - + /** - * Methode appelee par le notifyAdded de la EbliScene apres ajout du node. - * Dans cette classe on peut appliquer des traitement particuliers tout juste apres insertion dans la scene. + * Methode appelee par le notifyAdded de la EbliScene apres ajout du node. Dans cette classe on peut appliquer des + * traitement particuliers tout juste apres insertion dans la scene. + * * @see EbliWidgetCreatorConnectionWidget * @param node */ - public void notifyNodeAdded(EbliNode node){ } - - + public void notifyNodeAdded(EbliNode node) {} + /** * Est appel\xE9 des que la widget a \xE9t\xE9 d\xE9plac\xE9. + * * @param _location */ - public void notifyWidgetMoved(final Point _location){ } - - public final void bringToPosition (int position) { - if (getParentWidget() == null) - return; - List<Widget> children = getParentWidget().getChildren(); - int i = children.indexOf (this); - if (i < 0) - return; - children.remove (i); - children.add (position, this); - revalidate (); - getParentWidget().revalidate (); + public void notifyWidgetMoved(final Point _location) {} + + public final void bringToPosition(int position) { + if (getParentWidget() == null) return; + List<Widget> children = getParentWidget().getChildren(); + int i = children.indexOf(this); + if (i < 0) return; + children.remove(i); + children.add(position, this); + revalidate(); + getParentWidget().revalidate(); } - + } \ No newline at end of file Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -24,16 +24,9 @@ public EbliWidgetArrowEditor(EbliScene scene, EbliEditorArrow editor) { super(scene, false); - // TODO Auto-generated constructor stub editor_ = editor; editor_.model_ = getTraceLigneModel(); editor_.foreground_ = getColorContour(); - // -- creation de l action pour editor --// - // final WidgetAction editorAction = ActionFactory.createInplaceEditorAction(this); - - // -- ajout de l action au widget correspondant --// - // this.getActions().addAction(editorAction); - final EbliWidgetControllerFlecheEditor controller = new EbliWidgetControllerFlecheEditor(this); controller.setEditable(true); setController(controller); Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -45,8 +45,8 @@ } @Override - public void setId_(final String id_) { - intern_.setId_(id_); + public void setId(final String id_) { + intern_.setId(id_); } @Override @@ -167,20 +167,6 @@ return new Insets(epaisseur, epaisseur, epaisseur, epaisseur); } - // protected void paintWidget() { - // // getGraphics().setColor(getColorFond()); - // // getGraphics().fillRect(insets_.left, insets_.top, - // // getClientArea().width - insets_.left - insets_.right, - // // getClientArea().height - insets_.bottom - insets_.top); - // // getGraphics().setColor(getColorContour()); - // // - // // TraceLigne tl = new TraceLigne(getTraceLigneModel()); - // // tl.dessineRectangle(getGraphics(), 0, 0, getClientArea().width, - // getClientArea().getHeight()); - // - // - // } - /** * surcharge des methodes getProperty pour recuperer les proprietes graphiques et les dipatcher a son conteneur */ @@ -231,20 +217,6 @@ return mapMeltingPot; } - // /** - // * surcharge des getter et setter graphical properties pour rediriger les infos vers les widgets contenu - // */ - // public void setPropGraphique(Map<String, Object> propGraphique) { - // this.propGraphique.put(COLORCONTOUR, propGraphique.get(COLORCONTOUR)); - // this.propGraphique.put(LINEMODEL, propGraphique.get(LINEMODEL)); - // - // // -- on redirige les proprietes font,couleur de fond et rotation --// - // this.intern_.setFormeFont((Font) propGraphique.get(FONT)); - // this.intern_.setColorFond((Color) propGraphique.get(COLORFOND)); - // this.intern_.setRotation((Double) propGraphique.get(ROTATION)); - // - // } - @Override public EbliWidget getIntern() { return intern_; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -1,19 +1,12 @@ package org.fudaa.ebli.visuallibrary; +import java.awt.Component; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; -import javax.swing.AbstractButton; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JOptionPane; -import javax.swing.JPopupMenu; -import javax.swing.JToolBar; +import javax.swing.*; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluExportDataInterface; @@ -171,19 +164,8 @@ menuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { + getWidget().setWidgetVisible(false); - // -- si la widget a une bordure c'est la bordure que l on masque --// - - // EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - // if (n.getCreator().getBordure() != null) { - // n.getCreator().getBordure().setVisible(false); - // cmd_.addCmd(new CommandMasquer(n.getCreator().getBordure())); - // } else { - final EbliWidget toHide = widget_.getParentBordure(); - toHide.setVisible(false); - cmd_.addCmd(new CommandMasquer(toHide)); - // } - widget_.getEbliScene().refresh(); } }); @@ -214,15 +196,14 @@ private boolean isProportional = false; public void constructMenuResizeProportional(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { -if(!isProportional()){ - final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Proportional(widget_); - boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); -} -else{ - final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Classical(widget_); - boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); - -} + if (!isProportional()) { + final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Proportional(widget_); + boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); + } else { + final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Classical(widget_); + boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); + + } _popup.add(boutonProportion); } @@ -294,12 +275,9 @@ */ public void constructPopupMenuBase(final JPopupMenu _popup) { - // -- reference vers le gestionnaire de commandeundo/redo --// final CtuluCommandContainer cmd_ = getWidget().getEbliScene().getCmdMng(); - constructMenuDeplacerDansArbre(_popup); - final JMenuItem menuItem3 = _popup.add(EbliResource.EBLI.getString("Informations")); menuItem3.setIcon(BuResource.BU.getIcon("crystal_aide")); menuItem3.addActionListener(new ActionListener() { @@ -313,9 +291,12 @@ }); _popup.addSeparator(); constructMenuMasquer(_popup, cmd_); + constructMenuSupprimer(_popup, cmd_); + _popup.addSeparator(); constructMenuBloquer(_popup, cmd_); constructMenuResizeProportional(_popup, cmd_); - constructMenuSupprimer(_popup, cmd_); + _popup.addSeparator(); + constructMenuDeplacerDansArbre(_popup); if (canDuplicate_) { _popup.addSeparator(); constructMenuDupliquer(_popup, cmd_); @@ -323,35 +304,37 @@ } - - public void constructMenuDeplacerDansArbre(JPopupMenu menu){ - -// EbliActionSimple action=null; - - menu.add( new EbliActionSimple(EbliResource.EBLI.getString("En premier"),EbliResource.EBLI.getIcon("enpremier"),"ENPREMIER"){ - public void actionPerformed(final ActionEvent _e) { - widget_.getEbliScene().bringToLast(widget_) ; - } - }); - menu.add( new EbliActionSimple(EbliResource.EBLI.getString("Monter"),EbliResource.EBLI.getIcon("monter"),"MONTER"){ - public void actionPerformed(final ActionEvent _e) { - widget_.getEbliScene().bringUp(widget_) ; - } - }); - menu.add( new EbliActionSimple(EbliResource.EBLI.getString("Descendre"),EbliResource.EBLI.getIcon("descendre"),"DESCENTRE"){ - public void actionPerformed(final ActionEvent _e) { - widget_.getEbliScene().bringDown(widget_) ; - } - }); - menu.add( new EbliActionSimple(EbliResource.EBLI.getString("En dernier"),EbliResource.EBLI.getIcon("endernier"),"ENPREMIER"){ - public void actionPerformed(final ActionEvent _e) { - widget_.getEbliScene().bringToFirst(widget_) ; - } - }); - - + public void constructMenuDeplacerDansArbre(JPopupMenu menu) { + + // EbliActionSimple action=null; + + menu.add(new EbliActionSimple(EbliResource.EBLI.getString("En premier"), EbliResource.EBLI.getIcon("enpremier"), + "ENPREMIER") { + public void actionPerformed(final ActionEvent _e) { + widget_.getEbliScene().bringToLast(widget_); + } + }); + menu + .add(new EbliActionSimple(EbliResource.EBLI.getString("Monter"), EbliResource.EBLI.getIcon("monter"), "MONTER") { + public void actionPerformed(final ActionEvent _e) { + widget_.getEbliScene().bringUp(widget_); + } + }); + menu.add(new EbliActionSimple(EbliResource.EBLI.getString("Descendre"), EbliResource.EBLI.getIcon("descendre"), + "DESCENTRE") { + public void actionPerformed(final ActionEvent _e) { + widget_.getEbliScene().bringDown(widget_); + } + }); + menu.add(new EbliActionSimple(EbliResource.EBLI.getString("En dernier"), EbliResource.EBLI.getIcon("endernier"), + "ENPREMIER") { + public void actionPerformed(final ActionEvent _e) { + widget_.getEbliScene().bringToFirst(widget_); + } + }); + } - + /** * Attention ce menu ne doit pas apparaitre pour les calques et graphe car il n a aucun effet. * @@ -455,6 +438,16 @@ popupMenu_ = new JPopupMenu(); buildPopupMenu(popupMenu_); } + // on met \xE0 jour l'\xE9tat des menus si possible. + int nb = popupMenu_.getComponentCount(); + for (int i = 0; i < nb; i++) { + Component component = popupMenu_.getComponent(i); + if ((component instanceof AbstractButton) + && (((AbstractButton) component).getAction() instanceof EbliActionSimple)) { + ((EbliActionSimple) ((AbstractButton) component).getAction()).updateStateBeforeShow(); + } + + } } /** @@ -570,8 +563,7 @@ } }).setToolTipText(CtuluLib.getS("Cr\xE9er une image \xE0 partir de la fen\xEAtre active")); menuExport.addMenuItem(CtuluLib.getS("Copier l'image dans le presse-papier"), - CtuluLibImage.SNAPSHOT_CLIPBOARD_COMMAND, CtuluResource.CTULU.getIcon("copie-image"), - new ActionListener() { + CtuluLibImage.SNAPSHOT_CLIPBOARD_COMMAND, CtuluResource.CTULU.getIcon("copie-image"), new ActionListener() { public void actionPerformed(final ActionEvent _e) { CtuluImageExport.exportImageInClipboard(_imageDataProducer, _ui); Copied: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetHtml.java (from rev 4923, trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java) =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetHtml.java (rev 0) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetHtml.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -0,0 +1,49 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ebli.visuallibrary; + +import javax.swing.JLabel; +import javax.swing.plaf.basic.BasicHTML; +import javax.swing.text.View; + +import org.netbeans.api.visual.widget.Scene; + +/** + * @author deniger + */ +public class EbliWidgetHtml extends EbliWidgetWithView { + + JLabel c = new JLabel(); + View view; + + public EbliWidgetHtml(Scene scene, String html) { + super(scene); + setHtml(html); + } + + public final void setHtml(String html) { + view = BasicHTML.createHTMLView(c, html); + c.setText(html); + } + + public final void setText(String html) { + setHtml(html); + } + + public final String getText() { + return c.getText(); + } + + @Override + protected JLabel getLabel() { + return c; + } + + @Override + protected View getView() { + return view; + } + +} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -91,59 +91,8 @@ view.paint(getGraphics(), clientArea); } - // protected void paintWidget() { - // Graphics2D g = getGraphics(); - // - // Rectangle rec = getClientArea(); - // - // decoupeEcriture(editorPane_.getDocumentText(), g); - // } - - /** - * Methode qui redessine l edition de texte proprement. - * - * @param text de l editeur html - * @param g - */ - // public void decoupeEcriture(String text, Graphics2D g) { - // - // int espaceLignes = 10; - // - // if(text==null || text.length()==0) - // return; - // - // Rectangle rec = getClientArea(); - // int indiceDep=0; - // int espaceAffichable = Math.min((int) (rec.width / 5), text.length()); - // - // for (int i = 0; indiceDep + espaceAffichable < text.length(); i++) { - // g.drawString(text.substring(indiceDep, indiceDep + espaceAffichable), rec.x, rec.y + i * espaceLignes); - // indiceDep = indiceDep + espaceAffichable; - // - // } - // - // - // } public CtuluHtmlEditorPanel createEditorComponent( final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { - // --creation du panel ekitcore - // if (conteneur == null) { - // conteneur = new BuPanel(new BuBorderLayout()); - // - // // final Rectangle rec = getClientArea(); - // // editorPane_.setSize(rec.width, rec.height); - // // editorPane_.setPreferredSize(new Dimension(rec.width, rec.height)); - // // conteneur.setPreferredSize(new Dimension(rec.width, rec.height)); - // // conteneur.setMaximumSize(new Dimension(rec.width, rec.height)); - // // conteneur.setMinimumSize(new Dimension(rec.width, rec.height)); - // conteneur.add(editorPane_, BuBorderLayout.CENTER); - // conteneur.add(editorPane_.getToolBar(true), BuBorderLayout.NORTH); - // conteneur.add(editorPane_.getMenuBar()); - // - // } - // -- on masque l affichage du widgetcomponent --// - // contenuHTML_.setText(""); - return editorPane_; } @@ -160,22 +109,6 @@ return null; } - // public void notifyClosing(final - // org.netbeans.api.visual.action.InplaceEditorProvider.EditorController - // controller, - // final Widget widget, final BuPanel editor, final boolean commit) { - // - // // -- mise a jour de intern avec le contenu du ekitcore --// - // - // contenuHTML_.setText(editorPane_.getDocumentText()); - // intern_.repaint(); - // intern_.revalidate(); - // this.repaint(); - // getEbliScene().refresh(); - // // intern_.setLabel(label.getText()); - // - // } - public void notifyClosing(final EditorController _controller, final Widget _widget, final CtuluHtmlEditorPanel _editor, final boolean _commit) { setHtml(editorPane_.getDocumentText()); Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -30,13 +30,7 @@ */ public EbliWidgetTextLabel(final EbliScene _scene, final String label) { super(_scene, false); - // inGaps_ = new Insets(largeurBorder + espaceInterieur, largeurBorder - // + espaceInterieur, largeurBorder + espaceInterieur, - // largeurBorder + espaceInterieur); - // Ce layout permet de placer le texte - // setLayout(new OverlayLayoutGap(inGaps_)); - intern = new LabelWidget(_scene); intern.setVerticalAlignment(VerticalAlignment.CENTER); intern.setAlignment(Alignment.CENTER); @@ -72,13 +66,6 @@ revalidate(); } - // @Override - // protected Rectangle calculateClientArea() { - // // Rectangle res = intern.getPreferredBounds(); - // // // TODO Auto-generated method stub - // // return new Rectangle(0, 0, 2 * (largeurBorder + espaceInterieur) - // // + res.width, 2 * (largeurBorder + espaceInterieur) + res.height); - // } @Override protected void paintWidget() { @@ -96,7 +83,6 @@ } public boolean isEnabled(final Widget widget) { - // TODO Auto-generated method stub return true; } Added: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithView.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithView.java (rev 0) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithView.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -0,0 +1,51 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ebli.visuallibrary; + +import java.awt.Rectangle; + +import javax.swing.JLabel; +import javax.swing.text.View; + +import org.netbeans.api.visual.widget.Scene; +import org.netbeans.api.visual.widget.Widget; + +/** + * @author deniger + */ +abstract class EbliWidgetWithView extends Widget { + + EbliWidgetWithView(Scene scene) { + super(scene); + // WrappedPlainView + // this.view = view; + super.setCheckClipping(true); + } + + protected abstract View getView(); + + protected abstract JLabel getLabel(); + + @Override + protected Rectangle calculateClientArea() { + Rectangle rec = new Rectangle(); + // the preferred size is here + rec.height = (int) getView().getPreferredSpan(View.Y_AXIS); + rec.width = (int) getView().getPreferredSpan(View.X_AXIS); + return rec; + } + + /** + * + */ + @Override + protected void paintWidget() { + Rectangle clientArea = getClientArea(); + getLabel().setFont(getFont()); + getLabel().setForeground(getForeground()); + getView().paint(getGraphics(), clientArea); + } + +} Added: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWrappedLine.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWrappedLine.java (rev 0) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWrappedLine.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -0,0 +1,61 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ebli.visuallibrary; + +import javax.swing.JLabel; +import javax.swing.text.View; + +import org.fudaa.ctulu.CtuluLibString; +import org.jdesktop.swingx.JXLabel; +import org.jdesktop.swingx.JXLabel.MultiLineSupport; +import org.netbeans.api.visual.widget.Scene; + +/** + * @author deniger + */ +public class EbliWidgetWrappedLine extends EbliWidgetWithView { + + JXLabel label = new JXLabel(); + View view; + + // private static Basic + + public EbliWidgetWrappedLine(Scene scene) { + this(scene, CtuluLibString.EMPTY_STRING); + } + + protected EbliWidgetWrappedLine(Scene scene, String txt) { + super(scene); + setText(txt); + } + + public void setText(String txt) { + label.setText(txt); + view = MultiLineSupport.createView(label); + } + + public String getText() { + return label.getText(); + } + + /** + * @param textPosition + * @see javax.swing.JLabel#setVerticalTextPosition(int) + */ + public void setVerticalTextPosition(int textPosition) { + label.setVerticalTextPosition(textPosition); + } + + @Override + protected JLabel getLabel() { + return label; + } + + @Override + protected View getView() { + return view; + } + +} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -203,8 +203,7 @@ // -- test si il s agit d un widget plage --// if (widget instanceof EbliWidgetPlage) { final EbliWidgetPlage widgetPlage = (EbliWidgetPlage) widget; - widgetPlage.getInternWidget().setFont(ft); - widgetPlage.getInternWidget().majText(); + widgetPlage.updateFont(ft); } } } @@ -220,7 +219,7 @@ } getParentWidget().revalidate(); - revalidate(); +// repaint(); getEbliScene().refresh(); } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -203,7 +203,17 @@ return widget_.getEbliScene().isObject(getNodeLegende()); } + public void cacheLegende() { + if (hasLegende()) { + getNodeLegende().getWidget().setWidgetVisible(false); + } + } + public void ajoutLegende() { + if (hasLegende()) { + getNodeLegende().getWidget().setWidgetVisible(true); + return; + } // -- creation de la l\xE9gende --// if (widget_.getEbliScene() != null) { @@ -219,19 +229,19 @@ if (this.legendeWidget_.get(calqueActif) == null) { // legendeWidget_ = (CalqueLegendeWidgetAdapter) widgetCalque_.calquePanel_.getCqLegend(); legendeWidget_.put(calqueActif, (CalqueLegendeWidgetAdapter) widgetCalque_.calquePanel_.getCqLegend()); + } + final CalqueLegendeWidgetAdapter legendeAdapter = this.legendeWidget_.get(calqueActif); - final CalqueLegendeWidgetAdapter legendeAdapter = this.legendeWidget_.get(calqueActif); + // -- creation de la legende + final Point positionLegende = new Point(); + if (widget_.getBounds() != null && widget_.getPreferredLocation() != null) { + positionLegende.x = widget_.getPreferredLocation().x + widget_.getBounds().width + 20; + positionLegende.y = widget_.getPreferredLocation().y; + setNodeLegende(legendeAdapter.createLegende(positionLegende, widget_.getEbliScene(), widget_.getId(), + calqueActif)); + } + widget_.getEbliScene().refresh(); - // -- creation de la legende - final Point positionLegende = new Point(); - if (widget_.getBounds() != null && widget_.getPreferredLocation() != null) { - positionLegende.x = widget_.getPreferredLocation().x + widget_.getBounds().width + 20; - positionLegende.y = widget_.getPreferredLocation().y; - setNodeLegende(legendeAdapter.createLegende(positionLegende, widget_.getEbliScene(), widget_.getId(), - calqueActif)); - } - widget_.getEbliScene().refresh(); - } } // } else if (getNodeLegende().hasWidget()) // // -- cas ou la legende existe mais est cach\xE9e --// @@ -339,27 +349,44 @@ }); } + @SuppressWarnings("serial") private void constructPopupMenuSpecifique(final JPopupMenu _popup) { - JMenuItem menuItem = _popup.add(EbliResource.EBLI.getString("Ajouter la l\xE9gende")); - menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_commentaire")); + + JMenuItem menuItem = new JMenuItem(EbliResource.EBLI.getString("Editer le calque")); + _popup.add(menuItem); + menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_editer")); menuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { + MenuEditer(); + + } + }); + _popup.addSeparator(); + _popup.add(new EbliActionSimple(EbliResource.EBLI.getString("Afficher la l\xE9gende"), CtuluResource.CTULU + .getIcon("crystal_commentaire"), "DISPLAY_LEGEND") { + public void actionPerformed(final ActionEvent e) { ajoutLegende(); } + + @Override + public void updateStateBeforeShow() { + setEnabled(!isLegendVisible()); + } }); - menuItem = new JMenuItem(EbliResource.EBLI.getString("Editer le calque")); - _popup.add(menuItem, 0); - menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_editer")); - menuItem.addActionListener(new ActionListener() { - + _popup.add(new EbliActionSimple(EbliResource.EBLI.getString("Cacher la l\xE9gende"), CtuluResource.CTULU + .getIcon("crystal_cacher"), "HIDE_LEGEND") { public void actionPerformed(final ActionEvent e) { + cacheLegende(); + } - MenuEditer(); - + @Override + public void updateStateBeforeShow() { + setEnabled(isLegendVisible()); } }); + _popup.addSeparator(); } @@ -610,4 +637,8 @@ public boolean fonctionsAlreadySpecified() { return alreadyCreate_; } + + private boolean isLegendVisible() { + return hasLegende() && getNodeLegende().getWidget().isVisible(); + } } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -1,7 +1,6 @@ package org.fudaa.ebli.visuallibrary.calque; import java.awt.Font; -import java.util.List; import java.util.Map; import org.fudaa.ebli.calque.BCalque; @@ -22,147 +21,148 @@ */ public class EbliWidgetCreatorLegende implements EbliWidgetCreator { - BCalqueLegendePanel g; + BCalqueLegendePanel g; - /** - * La cible de la llegende. - * Ce calque appartient au panelde calque. - * Cela permet de g\xE9n\xE9rer une legende par calque - */ - BCalque calqueCible_; - // EbliWidget res; - /** - * L'id de la widget qui a declench\xE9 la legende - */ - private String IdPossessor_; - EbliWidgetWithBordure res; + /** + * La cible de la llegende. Ce calque appartient au panelde calque. Cela permet de g\xE9n\xE9rer une legende par calque + */ + BCalque calqueCible_; + // EbliWidget res; + /** + * L'id de la widget qui a declench\xE9 la legende + */ + private String IdPossessor_; + EbliWidgetWithBordure res; - // BArbreCalqueModel modelTreeCalque_; + // BArbreCalqueModel modelTreeCalque_; - public EbliWidgetCreatorLegende(final BCalqueLegendePanel g, final String id,BCalque calqueCible) { - super(); - this.g = g; - IdPossessor_ = id; - calqueCible_=calqueCible; - // modelTreeCalque_ = model; - } + public EbliWidgetCreatorLegende(final BCalqueLegendePanel g, final String id, BCalque calqueCible) { + super(); + this.g = g; + IdPossessor_ = id; + calqueCible_ = calqueCible; + // modelTreeCalque_ = model; + } - public EbliWidgetCreatorLegende() { + public EbliWidgetCreatorLegende() { - } + } - public BCalqueLegendePanel getG() { - return g; - } + public BCalqueLegendePanel getG() { + return g; + } - public void setG(final BCalqueLegendePanel g) { - this.g = g; - } + public void setG(final BCalqueLegendePanel g) { + this.g = g; + } - public EbliWidget create(final EbliScene _scene) { - EbliWidgetCalqueLegende legende=new EbliWidgetCalqueLegende(_scene, false, g); - - final EbliWidgetCalqueLegende widgetLegende = CalqueLegendeWidgetAdapter.updateLegendeWidget( - legende, g, _scene); - res = new EbliWidgetBordureSingle(widgetLegende, true, true); - widgetLegende.setFormeFont(new Font("Helvetica", Font.PLAIN, 10)); - widgetLegende.updateFont(widgetLegende.getFormeFont()); - return res; - } + public EbliWidget create(final EbliScene _scene) { + EbliWidgetCalqueLegende legende = new EbliWidgetCalqueLegende(_scene, false, g); - public EbliWidget getWidget() { - return res; - } + final EbliWidgetCalqueLegende widgetLegende = CalqueLegendeWidgetAdapter.updateLegendeWidget(legende, g, _scene); + res = new EbliWidgetBordureSingle(widgetLegende, true, true); + widgetLegende.setFormeFont(new Font("Helvetica", Font.PLAIN, 10)); + widgetLegende.updateFont(widgetLegende.getFormeFont()); + return res; + } - public EbliNode duplicate(final EbliNode _nodeAdupliquer) { - return null; - } + public EbliWidget getWidget() { + return res; + } - public EbliWidgetWithBordure getBordure() { - return res; - } + public EbliNode duplicate(final EbliNode _nodeAdupliquer) { + return null; + } - public static class CoupleData{ - public String idPosessor; - public int indiceCalqueCible=0; - } + public EbliWidgetWithBordure getBordure() { + return res; + } - public Object getPersistData(final Map parameters) { - CoupleData data=new CoupleData(); - //-- on recupere l'indice du calque de la legende --// - data.idPosessor=IdPossessor_; + public static class CoupleData { + public String idPosessor; + public int indiceCalqueCible = 0; + } - //-- recuperation du calque --// - EbliWidget widget=getWidget().getEbliScene().findById(IdPossessor_); - if(widget !=null && widget.getController() instanceof EbliWidgetControllerCalque){ - ZEbliCalquesPanel calque=((EbliWidgetControllerCalque) widget.getController()).getVisuPanel(); + public Object getPersistData(final Map parameters) { + CoupleData data = new CoupleData(); + // -- on recupere l'indice du calque de la legende --// + data.idPosessor = IdPossessor_; - data.indiceCalqueCible= calque.getArbreCalqueModel().getIndexOfChild(calque.getArbreCalqueModel().getRoot(), calqueCible_); - if(data.indiceCalqueCible==-1) - data.indiceCalqueCible=0; - } + // -- recuperation du calque --// + EbliWidget widget = getWidget().getEbliScene().findById(IdPossessor_); + if (widget != null && widget.getController() instanceof EbliWidgetControllerCalque) { + ZEbliCalquesPanel calque = ((EbliWidgetControllerCalque) widget.getController()).getVisuPanel(); + data.indiceCalqueCible = calque.getArbreCalqueModel().getIndexOfChild(calque.getArbreCalqueModel().getRoot(), + calqueCible_); + if (data.indiceCalqueCible == -1) data.indiceCalqueCible = 0; + } - return data; - } + return data; + } + public boolean setPersistData(final Object data, final Map parameters) { + if (data == null) { + g = new BCalqueLegendePanel(new BCalqueLegende(), "empty"); + return true; + } else { + CoupleData datas = (CoupleData) data; + String idCalque = datas.idPosessor; + int indexCalque = datas.indiceCalqueCible; - public void setPersistData(final Object data, final Map parameters) { - if (data == null) g = new BCalqueLegendePanel(new BCalqueLegende(), "empty"); - else { - CoupleData datas=(CoupleData) data; - String idCalque = datas.idPosessor; - int indexCalque=datas.indiceCalqueCible; + if (idCalque != null) { + final EbliScene scene = (EbliScene) parameters.get("scene"); + // -- recherche de la widget qui contient l'id et rejouer l'action ajouter legende --// + // -- recuperation du calque --// + EbliWidget widget = scene.findById(idCalque); + if (widget != null && widget.getController() instanceof EbliWidgetControllerCalque) { + ZEbliCalquesPanel calque = ((EbliWidgetControllerCalque) widget.getController()).getVisuPanel(); - if(idCalque!=null){ - final EbliScene scene = (EbliScene) parameters.get("scene"); - // -- recherche de la widget qui contient l'id et rejouer l'action ajouter legende --// - //-- recuperation du calque --// - EbliWidget widget=scene.findById(idCalque); - if(widget !=null && widget.getController() instanceof EbliWidgetControllerCalque){ - ZEbliCalquesPanel calque=((EbliWidgetControllerCalque) widget.getController()).getVisuPanel(); - - //-- recuperation du bon calque --// - calqueCible_= (BCalque) calque.getArbreCalqueModel().getChild(calque.getArbreCalqueModel().getRoot(), indexCalque); - IdPossessor_=idCalque; - BCalqueLegendePanel legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_.get(calqueCible_); - g=legendePanel; - // -- mise a jour des sattelites --// + // -- recuperation du bon calque --// + calqueCible_ = (BCalque) calque.getArbreCalqueModel().getChild(calque.getArbreCalqueModel().getRoot(), + indexCalque); + IdPossessor_ = idCalque; + BCalqueLegendePanel legendePanel = ((CalqueLegendeWidgetAdapter) calque.getCqLegend()).legendePanel_ + .get(calqueCible_); + g = legendePanel; + // -- mise a jour des sattelites --// ((EbliWidgetControllerCalque) widget.getController()).setNodeLegende((EbliNode) parameters.get("node")); - - }else{ - ((List<String>)parameters.get("errorMsg")).add("Erreur, la frame Legende ne trouve pas sa frame calque d'ID "+idCalque); - - //-- recherche dans les children de la scene le premier calque qui fera l'affaire --// - for(EbliNode nodeSubstitut:scene.getNodes()){ - - if(nodeSubstitut.getWidget().getIntern() instanceof EbliWidgetVueCalque){ - ((List<String>)parameters.get("errorMsg")).add("Par consequent, la frame Legende sera rattachee a la frame calque d'ID "+nodeSubstitut.getWidget().getId()); - widget=nodeSubstitut.getWidget().getIntern(); - ZEbliCalquesPanel calque=((EbliWidgetControllerCalque) widget.getController()).getVisuPanel(); - - //-- recuperation du bon calque --// - calqueCible_= (BCalque) calque.getArbreCalqueModel().getChild(calque.getArbreCalqueModel().getRoot(), indexCalque); - IdPossessor_=idCalque; - //g=new BCalqueLegendePanel((BCalqueAffichage) calqueCible_,calqueCible_.getTitle()); - BCalqueLegendePanel legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_.get(calqueCible_);; - g=legendePanel; - // -- mise a jour des sattelites --// - ((EbliWidgetControllerCalque) widget.getController()).setNodeLegende((EbliNode) parameters.get("node")); - break; - } - - - } - - - - } - - + return true; + } + // else{ + + // ((List<String>)parameters.get("errorMsg")).add("Erreur, la frame Legende ne trouve pas sa frame calque d'ID "+idCalque); + // + // //-- recherche dans les children de la scene le premier calque qui fera l'affaire --// + // for(EbliNode nodeSubstitut:scene.getNodes()){ + // + // if(nodeSubstitut.getWidget().getIntern() instanceof EbliWidgetVueCalque){ + // ((List<String>)parameters.get("errorMsg")).add("Par consequent, la frame Legende sera rattachee a la frame calque d'ID "+nodeSubstitut.getWidget().getId()); + // widget=nodeSubstitut.getWidget().getIntern(); + // ZEbliCalquesPanel calque=((EbliWidgetControllerCalque) widget.getController()).getVisuPanel(); + // + // //-- recuperation du bon calque --// + // calqueCible_= (BCalque) calque.getArbreCalqueModel().getChild(calque.getArbreCalqueModel().getRoot(), + // indexCalque); + // IdPossessor_=idCalque; + // //g=new BCalqueLegendePanel((BCalqueAffichage) calqueCible_,calqueCible_.getTitle()); + // BCalqueLegendePanel + // legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_.get(calqueCible_);; + // g=legendePanel; + // // -- mise a jour des sattelites --// + // ((EbliWidgetControllerCalque) widget.getController()).setNodeLegende((EbliNode) parameters.get("node")); + // break; + // } + // + // + // } + + // } + } - } + return false; + } - } + } } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -121,16 +121,12 @@ return res; } - // public EbliWidgetVueCalque getWidgetCalque() { - // return widgetCalque_; - // } public void setCalque(ZEbliCalquesPanel calque) { this.calque_ = calque; } 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 @@ -151,7 +147,7 @@ return pathRelative; } - public void setPersistData(Object data, Map parameters) { + public boolean setPersistData(Object data, Map parameters) { // comment on recupere le dossier ? // il faut reconstruire le PersistenceManager par reflexion et c'est lui qui produire le ZEbliCalquesPanel if (data == null) calque_ = new ZEbliCalquesPanel(null); @@ -164,6 +160,7 @@ if (calque_ != null && calque_.getVueCalque() != null && calque_.getVueCalque().getViewBoite() != null) initZoom_ = persistance .getZoom(); } + return true; } } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetPlage.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetPlage.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetPlage.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -1,5 +1,6 @@ package org.fudaa.ebli.visuallibrary.calque; +import java.awt.Font; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; @@ -91,26 +92,8 @@ // intern_.setForeground(_cb.getCouleur()); setToolTipText(_cb.getLegende()); addChild(intern_); - - // -- ajouter l option de remplacer le text dans le label --// - - // -- creation de l action edition des labels --// - // WidgetAction editorAction = - // ActionFactory.createInplaceEditorAction(intern_); - // // -- ajout de l action au label correspondant --// - // intern_.getActions().addAction(editorAction); - - // setEnabled(false); } - // public String formatte(String texte) { - // if (texte.length() < plage_.getLegende().length()) { - // - // return texte; - // } else return texte.substring(0, plage_.getLegende().length()); - // - // } - public InternWidget getInternWidget() { return intern_; } @@ -119,17 +102,23 @@ return logo_; } + public void updateFont(Font ft) { + super.setFont(ft); + intern_.setFont(ft); + intern_.revalidate(); + logo_.revalidate(); + intern_.getScene().validate(); + logo_.revalidate(); + intern_.getScene().validate();//bizarre doit etre mis 2 fois... + } + public void majLabel() { // intern_.setForeground(plage_.getCouleur()); intern_.majText(); } - public void setInternLabel(final InternWidget intern_) { - this.intern_ = intern_; + public void setInternLabel(final InternWidget intern) { + this.intern_ = intern; } - public void setLogo_(final EbliWidget logo_) { - this.logo_ = logo_; - } - } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreator.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreator.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreator.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -15,13 +15,12 @@ */ EbliNode duplicate(EbliNode _nodeAdupliquer); - // FIXME pas de reference vers la widget creer: un creator peut etre utiliser pour plusieurs widget ! - // EbliWidgetWithBordure getBordure(); - /** * Methode qui permet d'injecter les datas dans le creator pour la persistence + * + * @return true si les donnees de persistences ont pu \xEAtre charg\xE9es. */ - public void setPersistData(Object data, Map parameters); + public boolean setPersistData(Object data, Map parameters); /** * Methode qui permet de recuperer les datas specifiques du creator Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorArrowEditor.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorArrowEditor.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorArrowEditor.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -63,11 +63,12 @@ return editor_.getPoints_(); } - public void setPersistData(final Object data, final Map parameters) { + public boolean setPersistData(final Object data, final Map parameters) { if (data == null) editor_ = new EbliEditorArrow(); else { editor_ = new EbliEditorArrow((Point[])data); } + return true; } } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorConnectionWidget.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorConnectionWidget.java 2009-09-10 11:38:42 UTC (rev 5100) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorConnectionWidget.java 2009-09-10 11:41:57 UTC (rev 5101) @@ -58,560 +58,510 @@ * Creator pour un widget creator connection. * * @author Adrien Hadoux - * */ -public class EbliWidgetCreatorConnectionWidget implements EbliWidgetCreator{ +public class EbliWidgetCreatorConnectionWidget implements EbliWidgetCreator { - /** - * les dimensions des widgets extremites qui permettent le deplacement de l'objet. - */ - public static int DIMENSION_DEFAULT_EXTREMITES=50; + /** + * les dimensions des widgets extremites qui permettent le deplacement de l'objet. + */ + public static int DIMENSION_DEFAULT_EXTREMITES = 50; - EbliSatteliteWidget connectionHead_; - EbliSatteliteWidget connectionTail_; - ConnectionWidget connection_; - /** - * Il s'agit de la widget principal vide qui d\xE9place tout le contenu (les widgets connections). - */ - EbliHelioCentiqueWidget conteneurFleche_; - LayerWidget layoutConteneur_; + EbliSatteliteWidget connectionHead_; + EbliSatteliteWidget connectionTail_; + ConnectionWidget connection_; + /** + * Il s'agit de la widget principal vide qui... [truncated message content] |
From: <had...@us...> - 2009-09-17 17:36:55
|
Revision: 5110 http://fudaa.svn.sourceforge.net/fudaa/?rev=5110&view=rev Author: hadouxad Date: 2009-09-17 17:36:46 +0000 (Thu, 17 Sep 2009) Log Message: ----------- correction des bugs Prepro 8 et 9 Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithView.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheController.java Added Paths: ----------- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java Added: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java =================================================================== --- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java (rev 0) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java 2009-09-17 17:36:46 UTC (rev 5110) @@ -0,0 +1,29 @@ +package org.fudaa.ctulu; + +/** + * Interface qui gere des evenements a executer ulterieurement en utilisant les methodes de declenchement. + * @author Adrien Hadoux + * + */ +public interface CtuluEventTrigger { + + public final static int TRIGGER_DESTROY=1; + public final static int TRIGGER_DUPLICATE=2; + public final static int TRIGGER_REFRESH=3; + + + /** + * Declenche une suppression a la toute fin. + */ + public void triggerDestroy(); + /** + * Declenche une duplication a la toute fin. + */ + public void triggerDuplicate(); + /** + * Declenche un refresh a la toute fin. + */ + public void triggerRefresh(); + + +} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-09-17 17:34:10 UTC (rev 5109) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-09-17 17:36:46 UTC (rev 5110) @@ -167,7 +167,7 @@ } public boolean isRemovable() { - return false; + return true; } public boolean isSegmentDrawn(final int _i) { Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java 2009-09-17 17:34:10 UTC (rev 5109) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java 2009-09-17 17:36:46 UTC (rev 5110) @@ -25,6 +25,7 @@ import com.memoire.fu.FuLog; import org.fudaa.ctulu.CtuluCommandManager; +import org.fudaa.ctulu.CtuluEventTrigger; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluLibString; @@ -41,941 +42,977 @@ * @version $Id: EGGraphe.java,v 1.26 2007-05-22 14:19:04 deniger Exp $ */ public class EGGraphe extends JComponent implements ComponentListener, EGGrapheModelListener, RepereMouseKeyTarget, - CtuluImageProducer { +CtuluImageProducer { - public static final Font DEFAULT_FONT = new Font("SansSerif", Font.PLAIN, 10); + public static final Font DEFAULT_FONT = new Font("SansSerif", Font.PLAIN, 10); - - /** - * Liste qui contient les parametres d'origines des titres, - * doit etre relanc\xE9 dans le cas ou l'on ajoute de nouveau une legende. - */ - HashMap<EGCourbe,String> listeTitlesOrigins_=new HashMap<EGCourbe,String>(); - - private static void zoomIn(final EGAxe _axe, final double _sCenter, final double _zoomFactor) { - final double newEcart = _axe.getEcart() * _zoomFactor / 2; - final double newMax = _sCenter + newEcart; - final double newMin = _sCenter - newEcart; - _axe.setBounds(newMin, newMax); - } - public static final String getAutorRestorePref() { - return "ebli.courbe.auto.restore"; - } + private List<CtuluEventTrigger> eventTriggerList; - private boolean autoRestore_ = EbliPreferences.EBLI.getBooleanProperty(getAutorRestorePref(), false); - private final RepereMouseKeyController repereController_; + public List<CtuluEventTrigger> getEventTriggerList(){ + if(eventTriggerList==null) + eventTriggerList=new ArrayList<CtuluEventTrigger>(); + return eventTriggerList; + } - TObjectIntHashMap axeOffset_; + /** + * Notify tous les events trigger par le bon statut que l'on peut retrouver dans + * CtuluEventTrigger + * @param status + */ + public void notifyAllTriggerEvent(int status){ + for(CtuluEventTrigger trigger:getEventTriggerList()) + switch(status){ + case CtuluEventTrigger.TRIGGER_DESTROY: trigger.triggerDestroy();break; + case CtuluEventTrigger.TRIGGER_DUPLICATE: trigger.triggerDuplicate();break; + case CtuluEventTrigger.TRIGGER_REFRESH: trigger.triggerRefresh();break; + default:; + } + } - Image cache_; - CtuluCommandManager cmd_; + public void addTriggerEvent(CtuluEventTrigger triggerEvent){ + getEventTriggerList().add(triggerEvent); + } + public void removeTriggerEvent(CtuluEventTrigger triggerEvent){ + getEventTriggerList().remove(triggerEvent); + } + public void clearTriggerEvent(){ + getEventTriggerList().clear(); + } - EGGrapheModel model_; - Map objectInitAxe_; + /** + * Liste qui contient les parametres d'origines des titres, + * doit etre relanc\xE9 dans le cas ou l'on ajoute de nouveau une legende. + */ + HashMap<EGCourbe,String> listeTitlesOrigins_=new HashMap<EGCourbe,String>(); - CtuluRange xRangeSpecByUser_; + private static void zoomIn(final EGAxe _axe, final double _sCenter, final double _zoomFactor) { + final double newEcart = _axe.getEcart() * _zoomFactor / 2; + final double newMax = _sCenter + newEcart; + final double newMin = _sCenter - newEcart; + _axe.setBounds(newMin, newMax); + } - protected double coeffLarger_ = 0.1; + public static final String getAutorRestorePref() { + return "ebli.courbe.auto.restore"; + } - // protected List components_; - protected EGRepere transformer_; + private boolean autoRestore_ = EbliPreferences.EBLI.getBooleanProperty(getAutorRestorePref(), false); - protected CtuluRange xRange_; + private final RepereMouseKeyController repereController_; - public EGGraphe(final EGGrapheModel _m) { - addComponentListener(this); - setOpaque(true); - setBackground(Color.WHITE); - setVisible(true); - setFocusable(true); - transformer_ = new EGRepere(); - model_ = _m; - model_.addModelListener(this); - cmd_ = new CtuluCommandManager(); - repereController_ = new RepereMouseKeyController(this); - setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); - - initTitlesOrigins(); - } + TObjectIntHashMap axeOffset_; - private void ajusteXAxe() { - final EGAxeHorizontal hAxe = getTransformer().getXAxe(); - final double xmin = getXMin(); - final double xmax = getXMax(); - final double ecart = (xmax - xmin) * coeffLarger_; - double r = getXMax() + ecart; - if (hAxe.getMaximum() > r) { - final double oldEcart = hAxe.getEcart(); - hAxe.setBounds(r - oldEcart, r); - } - r = getXMin() - ecart; - if (hAxe.getMinimum() < r) { - final double oldEcart = hAxe.getEcart(); - hAxe.setBounds(r, r + oldEcart); - } - maxXRangeCompute(); - } + Image cache_; - - - - private void computeXRange() { - if (xRange_ != null) { return; } - xRange_ = new CtuluRange(); - final EGGrapheModel m = getModel(); - if (FuLog.isDebug()) { - FuLog.debug("nb object " + m.getNbEGObject()); - } - if (!m.isSomethingToDisplay()) { - xRange_.max_ = 0; - xRange_.min_ = 0; - return; - } - xRange_.min_ = Double.MAX_VALUE; - xRange_.max_ = -Double.MAX_VALUE; - boolean done = false; - for (int i = m.getNbEGObject() - 1; i >= 0; i--) { - final EGObject g = m.getEGObject(i); - if (g.isVisible_) { - done |= g.ajusteX(xRange_); - } - } - if (!done || Double.isNaN(xRange_.min_)) { - xRange_.min_ = 0; - } - if (!done || Double.isNaN(xRange_.max_)) { - xRange_.max_ = 0; - } - } + CtuluCommandManager cmd_; - private double getZoomCoef() { - return 0.8; - } + EGGrapheModel model_; - private void maxXRangeCompute() { + Map objectInitAxe_; - if (this.xRangeSpecByUser_ != null) { - final EGAxeHorizontal h = transformer_.getXAxe(); - double min = h.getMinimum(); - double max = h.getMaximum(); - if (min < xRangeSpecByUser_.min_) { - min = xRangeSpecByUser_.min_; - } - if (max > xRangeSpecByUser_.max_) { - max = xRangeSpecByUser_.max_; - } - if (min != h.getMinimum() || max != h.getMaximum()) { - h.setBounds(min, max); - } - } + CtuluRange xRangeSpecByUser_; - } + protected double coeffLarger_ = 0.1; - /** - * Restore l'axe des x. - */ - private void restoreAxeX() { - final EGAxeHorizontal axe = getTransformer().getXAxe(); - axe.setBounds(getXMin(), getXMax()); - maxXRangeCompute(); - } + // protected List components_; + protected EGRepere transformer_; - private void restoreAxeY(final EGAxeVertical _axe, final CtuluRange _r) { - _axe.setBounds(_r.min_, _r.max_); - // _axe.setPas(_axe.getEcart() / 10); - } + protected CtuluRange xRange_; - private void translateX(final double _factor) { - translation((int) (transformer_.getWSansMarges() * _factor), 0); - } + public EGGraphe(final EGGrapheModel _m) { + addComponentListener(this); + setOpaque(true); + setBackground(Color.WHITE); + setVisible(true); + setFocusable(true); + transformer_ = new EGRepere(); + model_ = _m; + model_.addModelListener(this); + cmd_ = new CtuluCommandManager(); + repereController_ = new RepereMouseKeyController(this); + setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); - private void translateY(final double _factor) { - translation(0, (int) (transformer_.getHSansMarges() * _factor)); - } + initTitlesOrigins(); + } - protected void setZoomAdaptedFor(final EGObject _g) { - CtuluRange x = _g.getXRange(); - final EGAxeHorizontal h = transformer_.getXAxe(); - h.setBounds(x.min_, x.max_); - // h.pas = h.getEcart() / 5; - final EGAxeVertical v = _g.getAxeY(); - x = _g.getYRange(); - v.setBounds(x.min_, x.max_); - // v.pas = v.getEcart() / 5; - axeUpdated(); + private void ajusteXAxe() { + final EGAxeHorizontal hAxe = getTransformer().getXAxe(); + final double xmin = getXMin(); + final double xmax = getXMax(); + final double ecart = (xmax - xmin) * coeffLarger_; + double r = getXMax() + ecart; + if (hAxe.getMaximum() > r) { + final double oldEcart = hAxe.getEcart(); + hAxe.setBounds(r - oldEcart, r); + } + r = getXMin() - ecart; + if (hAxe.getMinimum() < r) { + final double oldEcart = hAxe.getEcart(); + hAxe.setBounds(r, r + oldEcart); + } + maxXRangeCompute(); + } - } - protected void updateRepere() { - transformer_.setXAxe(getModel().getAxeX()); - } - public void addModelListener(final EGGrapheModelListener _l) { - listenerList.add(EGGrapheModelListener.class, _l); - } - public synchronized void addPropertyChangeListener(final String _propertyName, final PropertyChangeListener _listener) { - super.addPropertyChangeListener(_propertyName, _listener); - } + private void computeXRange() { + if (xRange_ != null) { return; } + xRange_ = new CtuluRange(); + final EGGrapheModel m = getModel(); + if (FuLog.isDebug()) { + FuLog.debug("nb object " + m.getNbEGObject()); + } + if (!m.isSomethingToDisplay()) { + xRange_.max_ = 0; + xRange_.min_ = 0; + return; + } + xRange_.min_ = Double.MAX_VALUE; + xRange_.max_ = -Double.MAX_VALUE; + boolean done = false; + for (int i = m.getNbEGObject() - 1; i >= 0; i--) { + final EGObject g = m.getEGObject(i); + if (g.isVisible_) { + done |= g.ajusteX(xRange_); + } + } + if (!done || Double.isNaN(xRange_.min_)) { + xRange_.min_ = 0; + } + if (!done || Double.isNaN(xRange_.max_)) { + xRange_.max_ = 0; + } + } - public void axeAspectChanged(final EGAxe _c) { - fullRepaint(); - } + private double getZoomCoef() { + return 0.8; + } - public void axeContentChanged(final EGAxe _c) { - fullRepaint(); - } + private void maxXRangeCompute() { - public void axeUpdated() { - maxXRangeCompute(); - fullRepaint(); - fireAxeRepereChanged(null); - } + if (this.xRangeSpecByUser_ != null) { + final EGAxeHorizontal h = transformer_.getXAxe(); + double min = h.getMinimum(); + double max = h.getMaximum(); + if (min < xRangeSpecByUser_.min_) { + min = xRangeSpecByUser_.min_; + } + if (max > xRangeSpecByUser_.max_) { + max = xRangeSpecByUser_.max_; + } + if (min != h.getMinimum() || max != h.getMaximum()) { + h.setBounds(min, max); + } + } - public void componentHidden(final ComponentEvent _e) {} + } - public void componentMoved(final ComponentEvent _e) {} + /** + * Restore l'axe des x. + */ + private void restoreAxeX() { + final EGAxeHorizontal axe = getTransformer().getXAxe(); + axe.setBounds(getXMin(), getXMax()); + maxXRangeCompute(); + } - public void componentResized(final ComponentEvent _e) { - fullRepaint(); - } + private void restoreAxeY(final EGAxeVertical _axe, final CtuluRange _r) { + _axe.setBounds(_r.min_, _r.max_); + // _axe.setPas(_axe.getEcart() / 10); + } - public void componentShown(final ComponentEvent _e) {} + private void translateX(final double _factor) { + translation((int) (transformer_.getWSansMarges() * _factor), 0); + } - public EGMarges computeMarges() { - return computeMarges((Graphics2D) getGraphics()); - } + private void translateY(final double _factor) { + translation(0, (int) (transformer_.getHSansMarges() * _factor)); + } - public EGMarges computeMarges(Graphics2D _gr) { - final EGMarges m = new EGMarges(); - final EGAxeHorizontal xaxe = transformer_.getXAxe(); - if (xaxe == null) { - m.setBas(5); - m.setDroite(5); - } else { - m.setBas(xaxe.getBottomHeightNeeded(_gr)); - m.setDroite(xaxe.getRightWidthNeeded(_gr)); - } - m.setGauche(0); - m.setHaut(0); - int temp; - final EGGrapheModel model = getModel(); - final Set axeSet = new HashSet(); - EGAxeVertical last = null; - EGAxeVertical lastRight = null; - for (int i = model.getNbEGObject() - 1; i >= 0; i--) { - final EGObject o = model.getEGObject(i); - if ((getObject(i).isVisible()) && (o.isSomethingToDisplay())) { - final EGAxeVertical axe = getObject(i).getAxeY(); - if (axe.isVisible() && !axeSet.contains(axe)) { - axeSet.add(axe); + protected void setZoomAdaptedFor(final EGObject _g) { + CtuluRange x = _g.getXRange(); + final EGAxeHorizontal h = transformer_.getXAxe(); + h.setBounds(x.min_, x.max_); + // h.pas = h.getEcart() / 5; + final EGAxeVertical v = _g.getAxeY(); + x = _g.getYRange(); + v.setBounds(x.min_, x.max_); + // v.pas = v.getEcart() / 5; + axeUpdated(); - if (axe.isDroite()) { - m.ajouteMargesDroite(axe.getWidthNeeded(_gr)); - // on recupere le dernier pour enlever la partie qui sera dessin\xE9 dans le graphe - /* if (lastRight == null) */lastRight = axe; - } else { - m.ajouteMargesGauche(axe.getWidthNeeded(_gr)); - // meme combat - /* if (last == null) */last = axe; - } - temp = o.getMargeHautNeeded(_gr); - if (temp > m.getHaut()) { - m.setHaut(temp); - } - } - } - } - // on enleve les parties dessin\xE9es dans le graphe - if (last != null) { - m.setGauche(m.getGauche() - last.getWidthDrawnInGraphe(_gr)); - } - // on enleve les parties dessin\xE9es dans le graphe - if (lastRight != null) { - m.setDroite(m.getDroite() - lastRight.getWidthDrawnInGraphe(_gr)); - } - if (m.getGauche() <= 0) { - m.setGauche(15); - } - if (m.getHaut() <= 0) { - m.setHaut(15); - } - if (m.getDroite() <= 15) { - m.setDroite(15); - } - return m; - } + } - public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { - if (_visibil) { - xRange_ = null; - if (autoRestore_) { - restore(); - } else if (_c.isVisible_) { - final EGAxeVertical vert = _c.getAxeY(); - // si l'axe n'a pas d\xE9j\xE0 \xE9t\xE9 initialis\xE9. - if (!vert.isRangeInit()) { - vert.ajusteFor(_c); - } + protected void updateRepere() { + transformer_.setXAxe(getModel().getAxeX()); + } - } - } - fullRepaint(); - } + public void addModelListener(final EGGrapheModelListener _l) { + listenerList.add(EGGrapheModelListener.class, _l); + } - public void courbeContentChanged(final EGObject _c, final boolean _mustRestore) { - // pour l'instant les deux methodes sont identiques - structureChanged(_mustRestore); - } + public synchronized void addPropertyChangeListener(final String _propertyName, final PropertyChangeListener _listener) { + super.addPropertyChangeListener(_propertyName, _listener); + } - public void dessine(final Graphics _g, final int _w, final int _h, final boolean _fill) { - if (!isVisible()) { return; } - final Graphics2D g2d = (Graphics2D) _g; - BuLib.setAntialiasing(g2d); - final Color old = _g.getColor(); - if (_fill) { - g2d.setColor(Color.white); - g2d.fillRect(0, 0, _w, _h); - } - Font f; - final Font oldF = _g.getFont(); + public void axeAspectChanged(final EGAxe _c) { + fullRepaint(); + } - f = getFont(); - g2d.setFont(f); - g2d.setColor(Color.black); - final EGGrapheModel model = getModel(); - final int nbElement = model.getNbEGObject(); - transformer_.initFor(g2d, this); - // dessine axe horizontal - final Shape oldClip = g2d.getClip(); - // g2d.clip(new Rectangle(xMarge, yMarge, wMarge, hMarge)); - int prec = 0; - int precDroite = 0; - if (axeOffset_ == null) { - axeOffset_ = new TObjectIntHashMap(nbElement); - } else { - axeOffset_.clear(); - axeOffset_.ensureCapacity(nbElement); - } - for (int i = nbElement - 1; i >= 0; i--) { - final EGObject g = model.getEGObject(i); - if (g.isVisible_ && g.isSomethingToDisplay()) { - if (FuLog.isDebug()) { - FuLog.debug(getClass().getName() + " paint courbe c= " + g.getTitle()); - } - g.dessine(g2d, transformer_); - if (FuLog.isDebug()) { - FuLog.debug(getClass().getName() + " paint courbe c end "); - } + public void axeContentChanged(final EGAxe _c) { + fullRepaint(); + } - } - } - // on part dans l'autre sens pour les axe - for (int i = 0; i < nbElement; i++) { - final EGObject g = model.getEGObject(i); - if (!g.isVisible() || !g.isSomethingToDisplay()) { - continue; - } - if (!axeOffset_.containsKey(g.getAxeY())) { - final int rightAxe = g.getAxeY().getWidthDrawnInGraphe(g2d); - final int leftAxe = g.getAxeY().getWidthNeeded(g2d) - rightAxe; - if (g.getAxeY().isDroite()) { - if (precDroite > 0) { - precDroite += rightAxe; - } - axeOffset_.put(g.getAxeY(), precDroite); - precDroite += leftAxe; - } else { - if (prec > 0) { - prec += rightAxe; - } - axeOffset_.put(g.getAxeY(), prec); - prec += leftAxe; - } - } - } - final TObjectIntIterator iterator = axeOffset_.iterator(); - for (int i = axeOffset_.size(); i-- > 0;) { - iterator.advance(); - final EGAxeVertical v = (EGAxeVertical) iterator.key(); - v.dessine(g2d, transformer_, iterator.value()); - } - if (transformer_.getXAxe() == null) { return; } - transformer_.getXAxe().dessine(g2d, transformer_); + public void axeUpdated() { + maxXRangeCompute(); + fullRepaint(); + fireAxeRepereChanged(null); + } - g2d.setColor(old); - g2d.setClip(oldClip); - g2d.setFont(oldF); - } + public void componentHidden(final ComponentEvent _e) {} - public void fillWithAxeXInfo(final BPaletteInfo.InfoData _d) { - final EGAxeHorizontal axe = getTransformer().getXAxe(); - if (_d != null) { - final String pre = EbliLib.getS("Axe horizontal:") + CtuluLibString.ESPACE; - _d.put(pre + EbliLib.getS("Borne min"), axe.getStringAffiche(axe.getMinimum())); - _d.put(pre + EbliLib.getS("Borne max"), axe.getStringAffiche(axe.getMaximum())); - } - } + public void componentMoved(final ComponentEvent _e) {} - public void fireAxeRepereChanged(final EGAxe _a) { - getModel().fireAxeContentChanged(_a); - } + public void componentResized(final ComponentEvent _e) { + fullRepaint(); + } - public void fireColorChanged(final EGObject _i) { - getModel().fireCourbeAspectChanged(_i, false); - } + public void componentShown(final ComponentEvent _e) {} - public void fireVisibilityChanged(final EGObject _o) { - xRange_ = null; - getModel().fireCourbeAspectChanged(_o, false); - } + public EGMarges computeMarges() { + return computeMarges((Graphics2D) getGraphics()); + } - public void fullRepaint() { - cache_ = null; - if (isVisible()) { - repaint(); - } - } + public EGMarges computeMarges(Graphics2D _gr) { + final EGMarges m = new EGMarges(); + final EGAxeHorizontal xaxe = transformer_.getXAxe(); + if (xaxe == null) { + m.setBas(5); + m.setDroite(5); + } else { + m.setBas(xaxe.getBottomHeightNeeded(_gr)); + m.setDroite(xaxe.getRightWidthNeeded(_gr)); + } + m.setGauche(0); + m.setHaut(0); + int temp; + final EGGrapheModel model = getModel(); + final Set axeSet = new HashSet(); + EGAxeVertical last = null; + EGAxeVertical lastRight = null; + for (int i = model.getNbEGObject() - 1; i >= 0; i--) { + final EGObject o = model.getEGObject(i); + if ((getObject(i).isVisible()) && (o.isSomethingToDisplay())) { + final EGAxeVertical axe = getObject(i).getAxeY(); + if (axe.isVisible() && !axeSet.contains(axe)) { + axeSet.add(axe); - /* - * public void changeColor(EGCourbe i,Color _c){ if (i.setAspectContour(_c)) { fireColorChanged(i); } } - */ + if (axe.isDroite()) { + m.ajouteMargesDroite(axe.getWidthNeeded(_gr)); + // on recupere le dernier pour enlever la partie qui sera dessin\xE9 dans le graphe + /* if (lastRight == null) */lastRight = axe; + } else { + m.ajouteMargesGauche(axe.getWidthNeeded(_gr)); + // meme combat + /* if (last == null) */last = axe; + } + temp = o.getMargeHautNeeded(_gr); + if (temp > m.getHaut()) { + m.setHaut(temp); + } + } + } + } + // on enleve les parties dessin\xE9es dans le graphe + if (last != null) { + m.setGauche(m.getGauche() - last.getWidthDrawnInGraphe(_gr)); + } + // on enleve les parties dessin\xE9es dans le graphe + if (lastRight != null) { + m.setDroite(m.getDroite() - lastRight.getWidthDrawnInGraphe(_gr)); + } + if (m.getGauche() <= 0) { + m.setGauche(15); + } + if (m.getHaut() <= 0) { + m.setHaut(15); + } + if (m.getDroite() <= 15) { + m.setDroite(15); + } + return m; + } - public List getAllAxeVertical() { - return Arrays.asList(axeOffset_.keys()); - } + public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { + if (_visibil) { + xRange_ = null; + if (autoRestore_) { + restore(); + } else if (_c.isVisible_) { + final EGAxeVertical vert = _c.getAxeY(); + // si l'axe n'a pas d\xE9j\xE0 \xE9t\xE9 initialis\xE9. + if (!vert.isRangeInit()) { + vert.ajusteFor(_c); + } - public final CtuluCommandManager getCmd() { - return cmd_; - } + } + } + fullRepaint(); + } - public EGGrapheModel getModel() { - return model_; - } + public void courbeContentChanged(final EGObject _c, final boolean _mustRestore) { + // pour l'instant les deux methodes sont identiques + structureChanged(_mustRestore); + } - public void setModel(EGGrapheModel model) { - model_ = model; - } + public void dessine(final Graphics _g, final int _w, final int _h, final boolean _fill) { + if (!isVisible()) { return; } + final Graphics2D g2d = (Graphics2D) _g; + BuLib.setAntialiasing(g2d); + final Color old = _g.getColor(); + if (_fill) { + g2d.setColor(Color.white); + g2d.fillRect(0, 0, _w, _h); + } + Font f; + final Font oldF = _g.getFont(); - public EGObject getObject(final int _i) { - return getModel().getEGObject(_i); - } + f = getFont(); + g2d.setFont(f); + g2d.setColor(Color.black); + final EGGrapheModel model = getModel(); + final int nbElement = model.getNbEGObject(); + transformer_.initFor(g2d, this); + // dessine axe horizontal + final Shape oldClip = g2d.getClip(); + // g2d.clip(new Rectangle(xMarge, yMarge, wMarge, hMarge)); + int prec = 0; + int precDroite = 0; + if (axeOffset_ == null) { + axeOffset_ = new TObjectIntHashMap(nbElement); + } else { + axeOffset_.clear(); + axeOffset_.ensureCapacity(nbElement); + } + for (int i = nbElement - 1; i >= 0; i--) { + final EGObject g = model.getEGObject(i); + if (g.isVisible_ && g.isSomethingToDisplay()) { + if (FuLog.isDebug()) { + FuLog.debug(getClass().getName() + " paint courbe c= " + g.getTitle()); + } + g.dessine(g2d, transformer_); + if (FuLog.isDebug()) { + FuLog.debug(getClass().getName() + " paint courbe c end "); + } - public int getObjectNb() { - return getModel().getNbEGObject(); - } + } + } + // on part dans l'autre sens pour les axe + for (int i = 0; i < nbElement; i++) { + final EGObject g = model.getEGObject(i); + if (!g.isVisible() || !g.isSomethingToDisplay()) { + continue; + } + if (!axeOffset_.containsKey(g.getAxeY())) { + final int rightAxe = g.getAxeY().getWidthDrawnInGraphe(g2d); + final int leftAxe = g.getAxeY().getWidthNeeded(g2d) - rightAxe; + if (g.getAxeY().isDroite()) { + if (precDroite > 0) { + precDroite += rightAxe; + } + axeOffset_.put(g.getAxeY(), precDroite); + precDroite += leftAxe; + } else { + if (prec > 0) { + prec += rightAxe; + } + axeOffset_.put(g.getAxeY(), prec); + prec += leftAxe; + } + } + } + final TObjectIntIterator iterator = axeOffset_.iterator(); + for (int i = axeOffset_.size(); i-- > 0;) { + iterator.advance(); + final EGAxeVertical v = (EGAxeVertical) iterator.key(); + v.dessine(g2d, transformer_, iterator.value()); + } + if (transformer_.getXAxe() == null) { return; } + transformer_.getXAxe().dessine(g2d, transformer_); - public int getOffSet(final EGAxeVertical _axe) { - if (axeOffset_ != null) { return axeOffset_.get(_axe); } - return 0; - } + g2d.setColor(old); + g2d.setClip(oldClip); + g2d.setFont(oldF); + } - public RepereMouseKeyController getRepereController() { - return repereController_; - } + public void fillWithAxeXInfo(final BPaletteInfo.InfoData _d) { + final EGAxeHorizontal axe = getTransformer().getXAxe(); + if (_d != null) { + final String pre = EbliLib.getS("Axe horizontal:") + CtuluLibString.ESPACE; + _d.put(pre + EbliLib.getS("Borne min"), axe.getStringAffiche(axe.getMinimum())); + _d.put(pre + EbliLib.getS("Borne max"), axe.getStringAffiche(axe.getMaximum())); + } + } - public final EGCourbe getSelectedComponent() { - return getModel().getSelectedComponent(); - } + public void fireAxeRepereChanged(final EGAxe _a) { + getModel().fireAxeContentChanged(_a); + } - public EGRepere getTransformer() { - return transformer_; - } + public void fireColorChanged(final EGObject _i) { + getModel().fireCourbeAspectChanged(_i, false); + } - public double getTranslateFactor(final boolean _rapide) { - return (_rapide) ? 0.25 : 0.125; - } + public void fireVisibilityChanged(final EGObject _o) { + xRange_ = null; + getModel().fireCourbeAspectChanged(_o, false); + } - public final CtuluRange getUserXRange() { - return xRangeSpecByUser_; - } + public void fullRepaint() { + cache_ = null; + if (isVisible()) { + repaint(); + } + } - public double getXMax() { - computeXRange(); - return xRange_.max_; - } + /* + * public void changeColor(EGCourbe i,Color _c){ if (i.setAspectContour(_c)) { fireColorChanged(i); } } + */ - public double getXMin() { - computeXRange(); - return xRange_.min_; - } + public List getAllAxeVertical() { + return Arrays.asList(axeOffset_.keys()); + } - /* - * public Iterator getGroupIterator(){ return components_.iterator(); } - */ + public final CtuluCommandManager getCmd() { + return cmd_; + } - public boolean isAutoRestore() { - return autoRestore_; - } + public EGGrapheModel getModel() { + return model_; + } - public final boolean isUserXRangeSet() { - return xRangeSpecByUser_ != null; - } + public void setModel(EGGrapheModel model) { + model_ = model; + } - /** - * @param _o les objets a tester - * @return true si l'axe d'un de ces objets a ete mixe avec un autre. - */ - public boolean isVerticalAxisConfigurationMod(final EGObject[] _o) { - if (objectInitAxe_ != null && _o != null && _o.length > 0) { - for (int i = _o.length - 1; i >= 0; i--) { - if (objectInitAxe_.containsKey(_o[i])) { return true; } - } - } - return false; - } + public EGObject getObject(final int _i) { + return getModel().getEGObject(_i); + } - public void paintComponent(final Graphics _g) { - // Rectangle clipPrec_ = g.getClipBounds(); - final Dimension size = getSize(); - Graphics cg; - if (cache_ == null) { - try { - cache_ = createImage(size.width, size.height); - cg = cache_.getGraphics(); - } catch (final NullPointerException e) { - cache_ = null; - cg = _g; - } - dessine(cg, size.width, size.height, true); - if (cg != _g && cache_ != null) { - _g.drawImage(cache_, 0, 0, this); - } - } else { - _g.drawImage(cache_, 0, 0, this); - } - } + public int getObjectNb() { + return getModel().getNbEGObject(); + } - public void print(final Graphics _g) { - dessine(_g, getWidth(), getHeight(), false); - } + public int getOffSet(final EGAxeVertical _axe) { + if (axeOffset_ != null) { return axeOffset_.get(_axe); } + return 0; + } - public void removeModelListener(final EGGrapheModelListener _l) { - listenerList.remove(EGGrapheModelListener.class, _l); - } + public RepereMouseKeyController getRepereController() { + return repereController_; + } - public void restore() { - updateRepere(); - if (transformer_.getXAxe() == null) { return; } - restoreAxeX(); - - restoreAllYAxe(); -// final Map axeYRange = new HashMap(); -// final EGGrapheModel m = getModel(); -// for (int i = m.getNbEGObject() - 1; i >= 0; i--) { -// final EGObject o = m.getEGObject(i); -// if (o.isVisible_) { -// final EGAxeVertical axe = o.getAxeY(); -// CtuluRange r = (CtuluRange) axeYRange.get(axe); -// if (r == null) { -// r = new CtuluRange(); -// r.max_ = -Double.MAX_VALUE; -// r.min_ = Double.MAX_VALUE; -// axeYRange.put(axe, r); -// } -// o.ajusteY(r); -// } -// } -// for (final Iterator it = axeYRange.entrySet().iterator(); it.hasNext();) { -// final Map.Entry e = (Map.Entry) it.next(); -// final EGAxeVertical v = (EGAxeVertical) e.getKey(); -// final CtuluRange r = (CtuluRange) e.getValue(); -// if (Double.isNaN(r.max_) || Double.isInfinite(r.max_) || (r.max_ <= -Double.MAX_VALUE)) { -// r.max_ = 0; -// } -// if (Double.isNaN(r.min_) || Double.isInfinite(r.min_) || (r.min_ >= Double.MAX_VALUE)) { -// r.min_ = 0; -// } -// if (r.min_ == r.max_) { -// if (r.max_ == 0) { -// r.max_ = 1; -// r.min_ = -1; -// } else { -// r.max_ = r.min_ * 1.1; -// r.min_ = r.min_ * 0.9; -// } -// if (r.min_ == r.max_) { -// r.max_ = 1; -// r.min_ = -1; -// } -// } -// restoreAxeY(v, r); -// -// } - axeUpdated(); - } + public final EGCourbe getSelectedComponent() { + return getModel().getSelectedComponent(); + } - - /** - * restore uniquement les axes en y. - */ - public Map restoreAllYAxe() { - final Map axeYRange = new HashMap(); - final EGGrapheModel m = getModel(); - for (int i = m.getNbEGObject() - 1; i >= 0; i--) { - final EGObject o = m.getEGObject(i); - if (o.isVisible_) { - final EGAxeVertical axe = o.getAxeY(); - CtuluRange r = (CtuluRange) axeYRange.get(axe); - if (r == null) { - r = new CtuluRange(); - r.max_ = -Double.MAX_VALUE; - r.min_ = Double.MAX_VALUE; - axeYRange.put(axe, r); - } - o.ajusteY(r); - } - } - for (final Iterator it = axeYRange.entrySet().iterator(); it.hasNext();) { - final Map.Entry e = (Map.Entry) it.next(); - final EGAxeVertical v = (EGAxeVertical) e.getKey(); - final CtuluRange r = (CtuluRange) e.getValue(); - if (Double.isNaN(r.max_) || Double.isInfinite(r.max_) || (r.max_ <= -Double.MAX_VALUE)) { - r.max_ = 0; - } - if (Double.isNaN(r.min_) || Double.isInfinite(r.min_) || (r.min_ >= Double.MAX_VALUE)) { - r.min_ = 0; - } - if (r.min_ == r.max_) { - if (r.max_ == 0) { - r.max_ = 1; - r.min_ = -1; - } else { - r.max_ = r.min_ * 1.1; - r.min_ = r.min_ * 0.9; - } - if (r.min_ == r.max_) { - r.max_ = 1; - r.min_ = -1; - } - } - restoreAxeY(v, r); + public EGRepere getTransformer() { + return transformer_; + } - } - return axeYRange; - - } - - public void setAutoRestore(final boolean _autoRestore) { - if (_autoRestore != autoRestore_) { - autoRestore_ = _autoRestore; - if (autoRestore_) { - restore(); - } - EbliPreferences.EBLI.putBooleanProperty(getAutorRestorePref(), autoRestore_); - } - } + public double getTranslateFactor(final boolean _rapide) { + return (_rapide) ? 0.25 : 0.125; + } - public final void setCmd(final CtuluCommandManager _cmd) { - cmd_ = _cmd; - } + public final CtuluRange getUserXRange() { + return xRangeSpecByUser_; + } - public void setRapide(final boolean _b) { - // on ne fait rien - } + public double getXMax() { + computeXRange(); + return xRange_.max_; + } - public final void setUserXRange(final CtuluRange _rangeSpecByUser) { - xRangeSpecByUser_ = _rangeSpecByUser; - } + public double getXMin() { + computeXRange(); + return xRange_.min_; + } - public void setVisible(final EGObject _g, final boolean _b) { - if (_g.setVisible(_b)) { + /* + * public Iterator getGroupIterator(){ return components_.iterator(); } + */ - fireVisibilityChanged(_g); - } - } + public boolean isAutoRestore() { + return autoRestore_; + } - public void setXAxe(final EGAxeHorizontal _axe) { - transformer_.setXAxe(_axe); - getModel().setAxeX(_axe); - } + public final boolean isUserXRangeSet() { + return xRangeSpecByUser_ != null; + } - public void setXRangeIsModified() { - xRange_ = null; - } + /** + * @param _o les objets a tester + * @return true si l'axe d'un de ces objets a ete mixe avec un autre. + */ + public boolean isVerticalAxisConfigurationMod(final EGObject[] _o) { + if (objectInitAxe_ != null && _o != null && _o.length > 0) { + for (int i = _o.length - 1; i >= 0; i--) { + if (objectInitAxe_.containsKey(_o[i])) { return true; } + } + } + return false; + } - public void setZoomOn(final Point _no, final Point _se) { - final EGRepere repere = getTransformer(); - final EGAxeHorizontal hAxe = repere.getXAxe(); - double xReel = getTransformer().getXReel(_no.x); - double x2Reel = getTransformer().getXReel(_se.x); - if (xReel > x2Reel) { - hAxe.setBounds(x2Reel, xReel); - } else { - hAxe.setBounds(xReel, x2Reel); - } - ajusteXAxe(); - final List l = getAllAxeVertical(); - if (l != null) { - for (final Iterator it = l.iterator(); it.hasNext();) { - final EGAxeVertical yaxe = (EGAxeVertical) it.next(); - xReel = repere.getYReel(_no.y, yaxe); - x2Reel = repere.getYReel(_se.y, yaxe); - if (xReel > x2Reel) { - yaxe.setBounds(x2Reel, xReel); - } else { - yaxe.setBounds(xReel, x2Reel); - } - } - } - axeUpdated(); + public void paintComponent(final Graphics _g) { + // Rectangle clipPrec_ = g.getClipBounds(); + final Dimension size = getSize(); + Graphics cg; + if (cache_ == null) { + try { + cache_ = createImage(size.width, size.height); + cg = cache_.getGraphics(); + } catch (final NullPointerException e) { + cache_ = null; + cg = _g; + } + dessine(cg, size.width, size.height, true); + if (cg != _g && cache_ != null) { + _g.drawImage(cache_, 0, 0, this); + } + } else { + _g.drawImage(cache_, 0, 0, this); + } + } - } + public void print(final Graphics _g) { + dessine(_g, getWidth(), getHeight(), false); + } - public void setZoomOnPoint(final int _xEcran, final int _yecran, final boolean _out, final double _zoomFactor) { - final EGRepere repere = getTransformer(); - final EGAxeHorizontal hAxe = repere.getXAxe(); - double z = _out ? 1 / _zoomFactor : _zoomFactor; - if (Double.isNaN(z)) { - z = 1; - } - final double xReel = getTransformer().getXReel(_xEcran); - zoomIn(hAxe, xReel, z); - ajusteXAxe(); - final List l = getAllAxeVertical(); - if (l != null) { - for (final Iterator it = l.iterator(); it.hasNext();) { - final EGAxeVertical yaxe = (EGAxeVertical) it.next(); - zoomIn(yaxe, repere.getYReel(_yecran, yaxe), z); - } - } - axeUpdated(); - } + public void removeModelListener(final EGGrapheModelListener _l) { + listenerList.remove(EGGrapheModelListener.class, _l); + } - public void structureChanged() { - structureChanged(false); - } + public void restore() { + updateRepere(); + if (transformer_.getXAxe() == null) { return; } + restoreAxeX(); - public void structureChanged(final boolean _restore) { - setXRangeIsModified(); - if (autoRestore_ || _restore) { - restore(); - } else { - fullRepaint(); - } - } + restoreAllYAxe(); + // final Map axeYRange = new HashMap(); + // final EGGrapheModel m = getModel(); + // for (int i = m.getNbEGObject() - 1; i >= 0; i--) { + // final EGObject o = m.getEGObject(i); + // if (o.isVisible_) { + // final EGAxeVertical axe = o.getAxeY(); + // CtuluRange r = (CtuluRange) axeYRange.get(axe); + // if (r == null) { + // r = new CtuluRange(); + // r.max_ = -Double.MAX_VALUE; + // r.min_ = Double.MAX_VALUE; + // axeYRange.put(axe, r); + // } + // o.ajusteY(r); + // } + // } + // for (final Iterator it = axeYRange.entrySet().iterator(); it.hasNext();) { + // final Map.Entry e = (Map.Entry) it.next(); + // final EGAxeVertical v = (EGAxeVertical) e.getKey(); + // final CtuluRange r = (CtuluRange) e.getValue(); + // if (Double.isNaN(r.max_) || Double.isInfinite(r.max_) || (r.max_ <= -Double.MAX_VALUE)) { + // r.max_ = 0; + // } + // if (Double.isNaN(r.min_) || Double.isInfinite(r.min_) || (r.min_ >= Double.MAX_VALUE)) { + // r.min_ = 0; + // } + // if (r.min_ == r.max_) { + // if (r.max_ == 0) { + // r.max_ = 1; + // r.min_ = -1; + // } else { + // r.max_ = r.min_ * 1.1; + // r.min_ = r.min_ * 0.9; + // } + // if (r.min_ == r.max_) { + // r.max_ = 1; + // r.min_ = -1; + // } + // } + // restoreAxeY(v, r); + // + // } + axeUpdated(); + } - public void translateXLeft(final boolean _largeTranslate, final boolean _rapide) { - translateX(-getTranslateFactor(_rapide)); - } + /** + * restore uniquement les axes en y. + */ + public Map restoreAllYAxe() { + final Map axeYRange = new HashMap(); + final EGGrapheModel m = getModel(); + for (int i = m.getNbEGObject() - 1; i >= 0; i--) { + final EGObject o = m.getEGObject(i); + if (o.isVisible_) { + final EGAxeVertical axe = o.getAxeY(); + CtuluRange r = (CtuluRange) axeYRange.get(axe); + if (r == null) { + r = new CtuluRange(); + r.max_ = -Double.MAX_VALUE; + r.min_ = Double.MAX_VALUE; + axeYRange.put(axe, r); + } + o.ajusteY(r); + } + } + for (final Iterator it = axeYRange.entrySet().iterator(); it.hasNext();) { + final Map.Entry e = (Map.Entry) it.next(); + final EGAxeVertical v = (EGAxeVertical) e.getKey(); + final CtuluRange r = (CtuluRange) e.getValue(); + if (Double.isNaN(r.max_) || Double.isInfinite(r.max_) || (r.max_ <= -Double.MAX_VALUE)) { + r.max_ = 0; + } + if (Double.isNaN(r.min_) || Double.isInfinite(r.min_) || (r.min_ >= Double.MAX_VALUE)) { + r.min_ = 0; + } + if (r.min_ == r.max_) { + if (r.max_ == 0) { + r.max_ = 1; + r.min_ = -1; + } else { + r.max_ = r.min_ * 1.1; + r.min_ = r.min_ * 0.9; + } + if (r.min_ == r.max_) { + r.max_ = 1; + r.min_ = -1; + } + } + restoreAxeY(v, r); - public void translateXRight(final boolean _large, final boolean _rapide) { - translateX(getTranslateFactor(_rapide)); + } + return axeYRange; - } + } - public void translateYDown(final boolean _largeTranslate, final boolean _rapide) { - translateY(getTranslateFactor(_rapide)); + public void setAutoRestore(final boolean _autoRestore) { + if (_autoRestore != autoRestore_) { + autoRestore_ = _autoRestore; + if (autoRestore_) { + restore(); + } + EbliPreferences.EBLI.putBooleanProperty(getAutorRestorePref(), autoRestore_); + } + } - } + public final void setCmd(final CtuluCommandManager _cmd) { + cmd_ = _cmd; + } - public void translateYUp(final boolean _largeTranslate, final boolean _rapide) { - translateY(-getTranslateFactor(_rapide)); + public void setRapide(final boolean _b) { + // on ne fait rien + } - } + public final void setUserXRange(final CtuluRange _rangeSpecByUser) { + xRangeSpecByUser_ = _rangeSpecByUser; + } - public void translation(final double _realDx, final double _realDy, final boolean _rapide) { + public void setVisible(final EGObject _g, final boolean _b) { + if (_g.setVisible(_b)) { - } + fireVisibilityChanged(_g); + } + } - public void translation(final int _dx, final int _dy) { - final int width = (int) (0.5 * transformer_.getWSansMarges()); - final int height = (int) (0.5 * transformer_.getHSansMarges()); - final int x = (int) (0.5 * (transformer_.getMaxEcranX() + transformer_.getMinEcranX()) + _dx); - final int y = (int) (0.5 * (transformer_.getMaxEcranY() + transformer_.getMinEcranY()) + _dy); - setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); - } + public void setXAxe(final EGAxeHorizontal _axe) { + transformer_.setXAxe(_axe); + getModel().setAxeX(_axe); + } - public void useOneAxe(final EGAxeVertical[] _axes, final String _s, final CtuluRange _r) { - if (_axes == null || _axes.length < 2) { return; } - final EGAxeVertical newAxe = new EGAxeVertical(_axes[0]); - String t = _s; - if (_s == null) { - t = EbliLib.getS("Axe"); - } - newAxe.setTitre(t); - String unite = _axes[0].unite_; - for (int i = 1; i < _axes.length; i++) { - if ((unite != null) && !unite.equals(_axes[i].getUnite())) { - unite = null; - } - if (_r == null) { - newAxe.adjustBounds(_axes[i]); - } - } - if (_r != null) { - newAxe.setBounds(_r.min_, _r.max_); - } - /* - * if (_pas > 0) { newAxe.pas = _pas; } else newAxe.pas = newAxe.getEcart() / 5; - */ - newAxe.unite_ = unite; - for (int i = getObjectNb() - 1; i >= 0; i--) { - final EGObject o = getObject(i); - if (o.getAxeY() != null && CtuluLibArray.findObject(_axes, o.getAxeY()) >= 0) { - if (objectInitAxe_ == null) { - objectInitAxe_ = new HashMap(); - } - if (!objectInitAxe_.containsKey(o)) { - objectInitAxe_.put(o, o.getAxeY()); - } - o.setYaxe(newAxe); - } - } - } + public void setXRangeIsModified() { + xRange_ = null; + } - /** - * Permet de recuperer la configuration d'origine pour les axes des objets _o. - * - * @param _o les objets a parcourir - * @return true si l'axe vertical d'un des obj a ete reinitialise - */ - public boolean useVerticalAxisInitialConf(final EGObject[] _o) { - if (objectInitAxe_ != null && _o != null && _o.length > 0) { - boolean r = false; - for (int i = _o.length - 1; i >= 0; i--) { - if (objectInitAxe_.containsKey(_o[i])) { - r = true; - _o[i].setYaxe((EGAxeVertical) objectInitAxe_.get(_o[i])); - objectInitAxe_.remove(_o[i]); - } - } - return r; - } - return false; - } + public void setZoomOn(final Point _no, final Point _se) { + final EGRepere repere = getTransformer(); + final EGAxeHorizontal hAxe = repere.getXAxe(); + double xReel = getTransformer().getXReel(_no.x); + double x2Reel = getTransformer().getXReel(_se.x); + if (xReel > x2Reel) { + hAxe.setBounds(x2Reel, xReel); + } else { + hAxe.setBounds(xReel, x2Reel); + } + ajusteXAxe(); + final List l = getAllAxeVertical(); + if (l != null) { + for (final Iterator it = l.iterator(); it.hasNext();) { + final EGAxeVertical yaxe = (EGAxeVertical) it.next(); + xReel = repere.getYReel(_no.y, yaxe); + x2Reel = repere.getYReel(_se.y, yaxe); + if (xReel > x2Reel) { + yaxe.setBounds(x2Reel, xReel); + } else { + yaxe.setBounds(xReel, x2Reel); + } + } + } + axeUpdated(); - public void zoom(final boolean _out) { - final double factor = _out ? 1 / getZoomCoef() : getZoomCoef(); - final int width = (int) (factor * transformer_.getWSansMarges() / 2); - final int height = (int) (factor * transformer_.getHSansMarges() / 2); - final int x = (int) (0.5 * transformer_.getMaxEcranX() + transformer_.getMinEcranX()); - final int y = (int) (0.5 * transformer_.getMaxEcranY() + transformer_.getMinEcranY()); - setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); + } - } + public void setZoomOnPoint(final int _xEcran, final int _yecran, final boolean _out, final double _zoomFactor) { + final EGRepere repere = getTransformer(); + final EGAxeHorizontal hAxe = repere.getXAxe(); + double z = _out ? 1 / _zoomFactor : _zoomFactor; + if (Double.isNaN(z)) { + z = 1; + } + final double xReel = getTransformer().getXReel(_xEcran); + zoomIn(hAxe, xReel, z); + ajusteXAxe(); + final List l = getAllAxeVertical(); + if (l != null) { + for (final Iterator it = l.iterator(); it.hasNext();) { + final EGAxeVertical yaxe = (EGAxeVertical) it.next(); + zoomIn(yaxe, repere.getYReel(_yecran, yaxe), z); + } + } + axeUpdated(); + } - public void zoomIn() { - zoom(false); + public void structureChanged() { + structureChanged(false); + } - } + public void structureChanged(final boolean _restore) { + setXRangeIsModified(); + if (autoRestore_ || _restore) { + restore(); + } else { + fullRepaint(); + } + } - public Dimension getDefaultImageDimension() { - return getSize(); - } + public void translateXLeft(final boolean _largeTranslate, final boolean _rapide) { + translateX(-getTranslateFactor(_rapide)); - public BufferedImage produceImage(final int _w, final int _h, final Map _params) { - final BufferedImage i = CtuluLibImage.createImage(_w, _h, _params); - final Graphics2D g2d = i.createGraphics(); - CtuluLibImage.setBestQuality(g2d); - if (CtuluLibImage.mustFillBackground(_params)) { - g2d.setColor(Color.WHITE); - g2d.fillRect(0, 0, _w, _h); - } + } - if (getWidth() != _w || getHeight() != _h) { - g2d.scale(CtuluLibImage.getRatio(_w, getWidth()), CtuluLibImage.getRatio(_h, getHeight())); - } + public void translateXRight(final boolean _large, final boolean _rapide) { + translateX(getTranslateFactor(_rapide)); - print(g2d); - g2d.dispose(); - i.flush(); - return i; - } + } - public BufferedImage produceImage(final Map _params) { - return produceImage(getWidth(), getHeight(), _params); + public void translateYDown(final boolean _largeTranslate, final boolean _rapide) { + translateY(getTranslateFactor(_rapide)); - } + } - public void zoomOnMouse(final MouseEvent _evt, final boolean _isOut) { - final int x = _evt.getX(); - final int y = _evt.getY(); - final double factor = _isOut ? 1 / getZoomCoef() : getZoomCoef(); - final int width = (int) (transformer_.getWSansMarges() * factor / 2); - final int height = (int) (transformer_.getHSansMarges() * factor / 2); - /* - * int width = (int) (factor getWidth() / 2); int height = (int) (factor getHeight() / 2); - */setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); + public void translateYUp(final boolean _largeTranslate, final boolean _rapide) { + translateY(-getTranslateFactor(_rapide)); - } + } - public void zoomOut() { - zoom(true); + public void translation(final double _realDx, final double _realDy, final boolean _rapide) { - } - - - - public void initTitlesOrigins( ){ - EGCourbe[] listeCourbes=getModel().getCourbes(); - for(int i=0;i<listeCourbes.length;i++) - listeTitlesOrigins_.put(listeCourbes[i], listeCourbes[i].getTitle()); - - } - public void reinitTitlesOrigins( ){ - EGCourbe[] listeCourbes=getModel().getCourbes(); - for(int i=0;i<listeCourbes.length;i++) - if(listeTitlesOrigins_.get(listeCourbes[i])!=null) - listeCourbes[i].setTitle(listeTitlesOrigins_.get(listeCourbes[i])); - - } + } - public EGGraphe duplicate() { - EGGrapheDuplicator duplicator = new EGGrapheDuplicator(); - EGGraphe duplic = new EGGraphe(this.getModel().duplicate(duplicator)); - duplic.autoRestore_ = this.autoRestore_; - duplic.cache_ = null; - // on ne partage pas les undo/redo - duplic.cmd_ = new CtuluCommandManager(); + public void translation(final int _dx, final int _dy) { + final int width = (int) (0.5 * transformer_.getWSansMarges()); + final int height = (int) (0.5 * transformer_.getHSansMarges()); + final int x = (int) (0.5 * (transformer_.getMaxEcranX() + transformer_.getMinEcranX()) + _dx); + final int y = (int) (0.5 * (transformer_.getMaxEcranY() + transformer_.getMinEcranY()) + _dy); + setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); + } - // TODO: il y a soucis: les axes verticaux sont dupliqu\xE9 de partout et on n'a plus les ref - // -- copie des axes --// - if (this.axeOffset_ != null) { - duplic.axeOffset_ = new TObjectIntHashMap(); - int[] values = this.axeOffset_.getValues(); - Object[] liste = this.axeOffset_.keys(); - for (int i = 0; i < liste.length; i++) { - int value = values[i]; - EGAxeVertical axe = (EGAxeVertical) liste[i]; - duplic.axeOffset_.put(duplicator.duplicateAxeV(axe), value); - } - } - duplic.coeffLarger_ = this.coeffLarger_; + public void useOneAxe(final EGAxeVertical[] _axes, final String _s, final CtuluRange _r) { + if (_axes == null || _axes.length < 2) { return; } + final EGAxeVertical newAxe = new EGAxeVertical(_axes[0]); + String t = _s; + if (_s == null) { + t = EbliLib.getS("Axe"); + } + newAxe.setTitre(t); + String unite = _axes[0].unite_; + for (int i = 1; i < _axes.length; i++) { + if ((unite != null) && !unite.equals(_axes[i].getUnite())) { + unite = null; + } + if (_r == null) { + newAxe.adjustBounds(_axes[i]); + } + } + if (_r != null) { + newAxe.setBounds(_r.min_, _r.max_); + } + /* + * if (_pas > 0) { newAxe.pas = _pas; } else newAxe.pas = newAxe.getEcart() / 5; + */ + newAxe.unite_ = unite; + for (int i = getObjectNb() - 1; i >= 0; i--) { + final EGObject o = getObject(i); + if (o.getAxeY() != null && CtuluLibArray.findObject(_axes, o.getAxeY()) >= 0) { + if (objectInitAxe_ == null) { + objectInitAxe_ = new HashMap(); + } + if (!objectInitAxe_.containsKey(o)) { + objectInitAxe_.put(o, o.getAxeY()); + } + o.setYaxe(newAxe); + } + } + } - if (this.objectInitAxe_ != null) { - duplic.objectInitAxe_ = new HashMap(); + /** + * Permet de recuperer la configuration d'origine pour les axes des objets _o. + * + * @param _o les objets a parcourir + * @return true si l'axe vertical d'un des obj a ete reinitialise + */ + public boolean useVerticalAxisInitialConf(final EGObject[] _o) { + if (objectInitAxe_ != null && _o != null && _o.length > 0) { + boolean r = false; + for (int i = _o.length - 1; i >= 0; i--) { + if (objectInitAxe_.containsKey(_o[i])) { + r = true; + _o[i].setYaxe((EGAxeVertical) objectInitAxe_.get(_o[i])); + objectInitAxe_.remove(_o[i]); + } + } + return r; + } + return false; + } - Set set = this.objectInitAxe_.keySet(); - Object[] vals = this.objectInitAxe_.values().toArray(); - int cpt = 0; - for (Iterator it = set.iterator(); it.hasNext();) { - Object objet = it.next(); - if (objet instanceof EGAxeVertical) { - EGAxeVertical axe = (EGAxeVertical) objet; - duplic.objectInitAxe_.put(duplicator.duplicateAxeV(axe), vals[cpt++]); - } - // else if (objet instanceof meshviewer.profile.MvProfileCourbeGroup) { - // meshviewer.profile.MvProfileCourbeGroup profcourbe = objet; - // - // } + public void zoom(final boolean _out) { + final double factor = _out ? 1 / getZoomCoef() : getZoomCoef(); + final int width = (int) (factor * transformer_.getWSansMarges() / 2); + final int height = (int) (factor * transformer_.getHSansMarges() / 2); + final int x = (int) (0.5 * transformer_.getMaxEcranX() + transformer_.getMinEcranX()); + final int y = (int) (0.5 * transformer_.getMaxEcranY() + transformer_.getMinEcranY()); + setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); - else if (objet instanceof EGGroup) { - EGGroup groupe = (EGGroup) objet; - duplic.objectInitAxe_.put(groupe.duplicate(duplicator), vals[cpt++]); - } - } - if (this.xRange_ != null) duplic.xRange_ = new CtuluRange(this.xRange_); - if (this.transformer_ != null) duplic.transformer_ = this.transformer_.duplicate(duplicator); - if (this.xRangeSpecByUser_ != null) duplic.xRangeSpecByUser_ = new CtuluRange(this.xRangeSpecByUser_); + } - } - return duplic; - } + public void zoomIn() { + zoom(false); + } + + public Dimension getDefaultImageDimension() { + return getSize(); + } + + public BufferedImage produceImage(final int _w, final int _h, final Map _params) { + final BufferedImage i = CtuluLibImage.createImage(_w, _h, _params); + final Graphics2D g2d = i.createGraphics(); + CtuluLibImage.setBestQuality(g2d); + if (CtuluLibImage.mustFillBackground(_params)) { + g2d.setColor(Color.WHITE); + g2d.fillRect(0, 0, _w, _h); + } + + if (getWidth() != _w || getHeight() != _h) { + g2d.scale(CtuluLibImage.getRatio(_w, getWidth()), CtuluLibImage.getRatio(_h, getHeight())); + } + + print(g2d); + g2d.dispose(); + i.flush(); + return i; + } + + public BufferedImage produceImage(final Map _params) { + return produceImage(getWidth(), getHeight(), _params); + + } + + public void zoomOnMouse(final MouseEvent _evt, final boolean _isOut) { + final int x = _evt.getX(); + final int y = _evt.getY(); + final double factor = _isOut ? 1 / getZoomCoef() : getZoomCoef(); + final int width = (int) (transformer_.getWSansMarges() * factor / 2); + final int height = (int) (transformer_.getHSansMarges() * factor / 2); + /* + * int width = (int) (factor getWidth() / 2); int height = (int) (factor getHeight() / 2); + */setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); + + } + + public void zoomOut() { + zoom(true); + + } + + + + public void initTitlesOrigins( ){ + EGCourbe[] listeCourbes=getModel().getCourbes(); + for(int i=0;i<listeCourbes.length;i++) + listeTitlesOrigins_.put(listeCourbes[i], listeCourbes[i].getTitle()); + + } + public void reinitTitlesOrigins( ){ + EGCourbe[] listeCourbes=getModel().getCourbes(); + for(int i=0;i<listeCourbes.length;i++) + if(listeTitlesOrigins_.get(listeCourbes[i])!=null) + listeCourbes[i].setTitle(listeTitlesOrigins_.get(listeCourbes[i])); + + } + + public EGGraphe duplicate() { + EGGrapheDuplicator duplicator = new EGGrapheDuplicator(); + EGGraphe duplic = new EGGraphe(this.getModel().duplicate(duplicator)); + duplic.autoRestore_ = this.autoRestore_; + duplic.cache_ = null; + // on ne partage pas les undo/redo + duplic.cmd_ = new CtuluCommandManager(); + + // TODO: il y a soucis: les axes verticaux sont dupliqu\xE9 de partout et on n'a plus les ref + // -- copie des axes --// + if (this.axeOffset_ != null) { + duplic.axeOffset_ = new TObjectIntHashMap(); + int[] values = this.axeOffset_.getValues(); + Object[] liste = this.axeOffset_.keys(); + for (int i = 0; i < liste.length; i++) { + int value = values[i]; + EGAxeVertical axe = (EGAxeVertical) liste[i]; + duplic.axeOffset_.put(duplicator.duplicateAxeV(axe), value); + } + } + duplic.coeffLarger_ = this.coeffLarger_; + + if (this.objectInitAxe_ != null) { + duplic.objectInitAxe_ = new HashMap(); + + Set set = this.objectInitAxe_.keySet(); + Object[] vals = this.objectInitAxe_.values().toArray(); + int cpt = 0; + for (Iterator it = set.iterator(); it.hasNext();) { + Object objet = it.next(); + if (objet instanceof EGAxeVertical) { + EGAxeVertical axe = (EGAxeVertical) objet; + duplic.objectInitAxe_.put(duplicator.duplicateAxeV(axe), vals[cpt++]); + } + // else if (objet instanceof meshviewer.profile.MvProfileCourbeGroup) { + // meshviewer.profile.MvProfileCourbeGroup profcourbe = objet; + // + // } + + else if (objet instanceof EGGroup) { + EGGroup groupe = (EGGroup) objet; + duplic.objectInitAxe_.put(groupe.duplicate(duplicator), vals[cpt++]); + } + } + if (this.xRange_ != null) duplic.xRange_ = new CtuluRange(this.xRange_); + if (this.transformer_ != null) duplic.transformer_ = this.transformer_.duplicate(duplicator); + if (this.xRangeSpecByUser_ != null) duplic.xRangeSpecByUser_ = new CtuluRange(this.xRangeSpecByUser_); + + } + return duplic; + } + } \ No newline at end of file Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2009-09-17 17:34:10 UTC (rev 5109) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2009-09-17 17:36:46 UTC (rev 5110) @@ -17,6 +17,7 @@ import com.memoire.bu.BuSeparator; import org.fudaa.ctulu.CtuluCommandManager; +import org.fudaa.ctulu.CtuluEventTrigger; import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.CtuluUI; @@ -182,6 +183,12 @@ } } else if ("REMOVE_CURVES".equals(com)) { target_.getModel().removeSelectedCurves(cmd_); + + //--prepro 8 --// + if(targ... [truncated message content] |
From: <de...@us...> - 2009-09-17 22:32:19
|
Revision: 5112 http://fudaa.svn.sourceforge.net/fudaa/?rev=5112&view=rev Author: deniger Date: 2009-09-17 22:32:02 +0000 (Thu, 17 Sep 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionGraphes.java Added Paths: ----------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheModelListener.java Removed Paths: ------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheController.java Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -179,6 +179,42 @@ } + /** + * reschedule le repaint pour ce widget, le widget interne si present et des satellites si demande Attention, dans la + * librairie visuallibrary, il est bien pr\xE9cise que les methodes repaint ne font que dire que le widget devra etre + * repaint au prochain tour ( appele par EbliScene.refresh). + * + * @param includeSatellite true si on repaint les satellites + */ + public void repaintAll(boolean includeSatellite) { + repaint(); + if (getIntern() != null) getIntern().repaint(); + if (satellites != null) { + for (EbliWidget w : satellites) { + w.repaintAll(includeSatellite); + + } + } + } + + /** + * reschedule le revalidate de ce widget, le widget interne si present et des satellites si demande Attention, dans la + * librairie visuallibrary, il est bien pr\xE9cise que les methodes revalidate ne font que dire que le widget devra etre + * revalidatee au prochain tour ( appele par EbliScene.refresh). + * + * @param includeSatellite true si on revalidate les satellites + */ + public void revalidateAll(boolean includeSatellite) { + revalidate(); + if (getIntern() != null) getIntern().revalidate(); + if (satellites != null) { + for (EbliWidget w : satellites) { + w.revalidateAll(includeSatellite); + + } + } + } + private boolean changeVisible(final boolean _newValue, final boolean _cmd) { if (_newValue == isVisible()) return false; setVisible(_newValue); @@ -276,12 +312,7 @@ */ public Point getPreferredLocationOnScreen() { Widget parentWidget = getParentWidget(); - - Point loc=null; - try{ - loc=parentWidget == null ? getPreferredLocation() : parentWidget.convertLocalToScene(getPreferredLocation()); - }catch(Exception e){} - return loc; + return parentWidget == null ? getPreferredLocation() : parentWidget.convertLocalToScene(getPreferredLocation()); } /** @@ -388,10 +419,7 @@ } public void addSatellite(EbliWidget w) { - if(w==null) - return; - - createSatelliteList(); + createSatelliteList(); satellites.add(w); w.satelliteOwner = this; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -3,6 +3,7 @@ import java.awt.Graphics2D; import java.awt.Insets; import java.awt.Rectangle; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -86,7 +87,7 @@ } OverlayLayoutGap layout_; - + public EbliWidgetBordureSingle(final EbliWidget _intern, final boolean canMove, final boolean canResize) { super(_intern.getEbliScene(), false); @@ -107,7 +108,6 @@ this.setController(controllerBordure_); } - protected void paintWidget() { // -- mise a jour de la fonte que si il y a eu une modification --// @@ -135,34 +135,32 @@ g.translate(-rec.x, -rec.y); // setBackground(getColorFond()); - + // layout_.justify(intern_); insets_ = createInset((int) getTraceLigneModel().getEpaisseur()); - + layout_ = new OverlayLayoutGap(insets_); setLayout(layout_); - - - - //-- on redimensionne la frame correctement --// - if(oldTraceligne_.getEpaisseur()!=l.getEpaisseur()){ - //-- on ajoute le delta d'epaisseur --// - float delta=l.getEpaisseur()-oldTraceligne_.getEpaisseur(); -// System.out.println("\n***Delta: "+delta); - Rectangle sizeWidget=this.getPreferredBounds(); - //-- on rajoute le double de delta pour l'\xE9paisseur des 2 cot\xE9s --// - sizeWidget.height+=2*delta; - sizeWidget.width+=2*delta; - this.setPreferredBounds(sizeWidget); - oldTraceligne_=new TraceLigne(l) ; + + // -- on redimensionne la frame correctement --// + if (oldTraceligne_.getEpaisseur() != l.getEpaisseur()) { + // -- on ajoute le delta d'epaisseur --// + float delta = l.getEpaisseur() - oldTraceligne_.getEpaisseur(); + // System.out.println("\n***Delta: "+delta); + Rectangle sizeWidget = this.getPreferredBounds(); + // -- on rajoute le double de delta pour l'\xE9paisseur des 2 cot\xE9s --// + sizeWidget.height += 2 * delta; + sizeWidget.width += 2 * delta; + this.setPreferredBounds(sizeWidget); + oldTraceligne_ = new TraceLigne(l); } - - + revalidate(); - + } - TraceLigne oldTraceligne_=new TraceLigne(getTraceLigneModel().buildCopy()); - + + TraceLigne oldTraceligne_ = new TraceLigne(getTraceLigneModel().buildCopy()); + public Insets createInset(final int epaisseur) { return new Insets(epaisseur, epaisseur, epaisseur, epaisseur); @@ -192,7 +190,7 @@ @Override protected void setPropertyCmd(final String _key, final Object _prop, final CtuluCommandContainer _cmd) { - if (_key.equals(LINEMODEL) || _key.equals(COLORCONTOUR) || _key.equals(COLORFOND) ||_key.equals(TRANSPARENCE)) { + if (_key.equals(LINEMODEL) || _key.equals(COLORCONTOUR) || _key.equals(COLORFOND) || _key.equals(TRANSPARENCE)) { super.setPropertyCmd(_key, _prop, _cmd); } else { intern_.setPropertyCmd(_key, _prop, _cmd); @@ -251,11 +249,23 @@ public boolean canFont() { return intern_.canFont(); } + public boolean hasSattelite() { return intern_.hasSattelite(); } + public Set<EbliWidget> getSatellites() { return intern_.getSatellites(); } - + + @Override + public void addSatellite(EbliWidget w) { + intern_.addSatellite(w); + } + + @Override + public void setSatellite(Collection<EbliWidget> liste) { + intern_.setSatellite(liste); + } + } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -9,14 +9,6 @@ import javax.swing.*; - -import org.fudaa.ctulu.CtuluCommandContainer; -import org.fudaa.ctulu.CtuluEventTrigger; -import org.fudaa.ctulu.CtuluExportDataInterface; -import org.fudaa.ctulu.CtuluLib; -import org.fudaa.ctulu.CtuluLibImage; -import org.fudaa.ctulu.CtuluResource; -import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.*; import org.fudaa.ctulu.image.CtuluImageExport; import org.fudaa.ctulu.image.CtuluImageProducer; @@ -42,7 +34,7 @@ * * @author genesis */ -public class EbliWidgetController implements EbliWidgetControllerInterface,CtuluEventTrigger { +public class EbliWidgetController implements EbliWidgetControllerInterface, CtuluEventTrigger { /** * @param _isEditable the isEditable to set @@ -102,20 +94,20 @@ } - private void actionDupliquer(){ - // -- liste des nodes candidats pour le UNdo/redo --// - ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); - duplication(listeNodeUndo, widget_.getEbliScene()); - getCmdManager().addCmd(new CommandeDuplicate(listeNodeUndo, widget_.getEbliScene())); + private void actionDupliquer() { + // -- liste des nodes candidats pour le UNdo/redo --// + ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); + duplication(listeNodeUndo, widget_.getEbliScene()); + getCmdManager().addCmd(new CommandeDuplicate(listeNodeUndo, widget_.getEbliScene())); } - + protected void constructMenuDupliquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem1 = _popup.add(EbliResource.EBLI.getString("Dupliquer la frame")); menuItem1.setIcon(CtuluResource.CTULU.getIcon("crystal_cascade")); menuItem1.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { - actionDupliquer(); + actionDupliquer(); } }); @@ -237,17 +229,16 @@ } - - protected void actionSupprimer(final CtuluCommandContainer cmd_){ - // -- liste des nodes candidats pour le UNdo/redo --// - ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); - ArrayList<Point> listeLocationUndo = new ArrayList<Point>(); + protected void actionSupprimer(final CtuluCommandContainer cmd_) { + // -- liste des nodes candidats pour le UNdo/redo --// + ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); + ArrayList<Point> listeLocationUndo = new ArrayList<Point>(); - suppression(listeNodeUndo, listeLocationUndo); - cmd_.addCmd(new CommandSupprimer(listeNodeUndo, widget_.getEbliScene(), listeLocationUndo)); + suppression(listeNodeUndo, listeLocationUndo); + cmd_.addCmd(new CommandSupprimer(listeNodeUndo, widget_.getEbliScene(), listeLocationUndo)); } - + protected void constructMenuSupprimer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem = _popup.add(EbliResource.EBLI.getString("Supprimer la frame")); menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_non")); @@ -255,10 +246,9 @@ public void actionPerformed(final ActionEvent e) { - actionSupprimer(cmd_); + actionSupprimer(cmd_); cmd_.addCmd(deleteWidget()); - } }); @@ -275,16 +265,17 @@ Set<EbliWidget> satellites = widget_.getSatellites(); if (satellites != null) { for (EbliWidget ebliWidget : satellites) { - ebliWidget.getController().suppression(listeNodeUndo, listeLocation); + EbliWidgetController controller = ebliWidget.getController(); + controller.suppression(listeNodeUndo, listeLocation); } } // -- on enleve le node de la scene --// widget_.getEbliScene().removeNode(n); } - - public CtuluCommandContainer getCmdManager(){ - return getWidget().getEbliScene().getCmdMng(); + + public CtuluCommandContainer getCmdManager() { + return getWidget().getEbliScene().getCmdMng(); } /** @@ -606,18 +597,20 @@ isProportional = _isProportional; } + public void triggerDestroy() { +// SwingUtilities.invokeLater(new Runnable() { +// public void run() {} +// +// { +// getWidget().getEbliScene().getController().fireEditStop(getWidget(), null); +// // getWidget().getEbliScene().refresh(); +// actionSupprimer(getCmdManager()); +// // getWidget().getEbliScene().refresh(); +// +// } +// }); + } - -public void triggerDestroy() { - SwingUtilities.invokeLater(new Runnable(){ - public void run() {}{ - getWidget().getEbliScene().getController().fireEditStop(getWidget(),null); - //getWidget().getEbliScene().refresh(); - actionSupprimer(getCmdManager()); - //getWidget().getEbliScene().refresh(); - - }}); -} public CtuluCommand deleteWidget() { ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); ArrayList<Point> listeLocationUndo = new ArrayList<Point>(); @@ -627,17 +620,14 @@ } return new CommandSupprimer(listeNodeUndo, widget_.getEbliScene(), listeLocationUndo); } - + public void triggerDuplicate() { + actionDupliquer(); + } -public void triggerDuplicate() { - actionDupliquer(); - -} + public void triggerRefresh() { + getWidget().repaint(); -public void triggerRefresh() { - getWidget().repaint(); - + } } -} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -33,9 +33,6 @@ super(_scene, _controllerDefaut); } - - - @Override protected void paintWidget() { @@ -62,10 +59,10 @@ g.translate(-rec.x, -rec.y); // setBackground(getColorFond()); - } + @Override protected void setPropertyCmd(final String _key, final Object _prop, final CtuluCommandContainer _cmd) { super.setPropertyCmd(_key, _prop, _cmd); Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -18,7 +18,7 @@ private static final long serialVersionUID = 1L; -// final CtuluCommandContainer cmd_; + // final CtuluCommandContainer cmd_; boolean bloque_ = true; EbliWidget widget_; @@ -27,7 +27,7 @@ super(_widget.getEbliScene(), name, ic, id); widget_ = _widget; -// cmd_ = _widget.getEbliScene().getCmdMng(); + // cmd_ = _widget.getEbliScene().getCmdMng(); bloque_ = bloque; } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -74,9 +74,7 @@ BCalqueLegendePanel pane = legendePanel_.get(_calqueCible); - if (pane == null) - // pane=new BCalqueLegendePanel((BCalqueAffichage) _calqueCible,"leg"); - return null; + if (pane == null) return null; def.setCreator(new EbliWidgetCreatorLegende(pane, _id, _calqueCible)); def.setTitle(EbliLib.getS("L\xE9gende calque") + " " + _calqueCible.getTitle()); Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -426,8 +426,6 @@ }// fin du if listeplage==null } } - if (getController() == null) setController(new EbliWidgetControllerLegendeCalque(this)); - // -- prendre en compte le resize automatique --// getEbliScene().refresh(); } else { Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -10,6 +10,7 @@ import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetControllerMenuOnly; +import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; /** * controller specifique aux legendes. gere @@ -18,8 +19,8 @@ */ public class EbliWidgetControllerLegendeCalque extends EbliWidgetControllerMenuOnly { - public EbliWidgetControllerLegendeCalque(final EbliWidget widget_) { - super(widget_); + public EbliWidgetControllerLegendeCalque(final EbliWidgetWithBordure widget) { + super(widget); } @Override @@ -55,7 +56,8 @@ */ public void MenuEditer() { // -- executer l action d edition --// - ((EbliWidgetCalqueLegende) getWidget()).editorAction_.openEditor(getWidget()); + EbliWidgetCalqueLegende widgetCalqueLegende = (EbliWidgetCalqueLegende) getWidget().getIntern(); + widgetCalqueLegende.editorAction_.openEditor(getWidget()); } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -61,6 +61,7 @@ legende.updateLegendeWidget(); res = new EbliWidgetBordureSingle(legende, true, true); legende.setFormeFont(new Font("Helvetica", Font.PLAIN, 10)); + legende.setController(new EbliWidgetControllerLegendeCalque(res)); return res; } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -10,7 +10,6 @@ import java.util.Iterator; import javax.swing.*; -import javax.swing.SwingUtilities; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; @@ -24,12 +23,7 @@ import org.fudaa.ebli.commun.EbliComponentFactory; import org.fudaa.ebli.courbe.*; import org.fudaa.ebli.ressource.EbliResource; -import org.fudaa.ebli.visuallibrary.EbliNode; -import org.fudaa.ebli.visuallibrary.EbliNodeDefault; -import org.fudaa.ebli.visuallibrary.EbliScene; -import org.fudaa.ebli.visuallibrary.EbliWidget; -import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; -import org.fudaa.ebli.visuallibrary.EbliWidgetControllerMenuOnly; +import org.fudaa.ebli.visuallibrary.*; import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; @@ -60,28 +54,29 @@ EbliActionEditorOneClick<BuPanel> editorAction_; - public void triggerDestroy() { - SwingUtilities.invokeLater(new Runnable(){ - public void run() {}{ - editorAction_.closeEditor(true); - //getWidget().getEbliScene().getController().fireEditStop(getWidget(),null); - getWidget().getEbliScene().refresh(); - actionSupprimer(getCmdManager()); - getWidget().getEbliScene().refresh(); - - }}); - } - + SwingUtilities.invokeLater(new Runnable() { + public void run() {} - public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { - super(widget_); + { + editorAction_.closeEditor(true); + // getWidget().getEbliScene().getController().fireEditStop(getWidget(),null); + getWidget().getEbliScene().refresh(); + actionSupprimer(getCmdManager()); + getWidget().getEbliScene().refresh(); - widgetGraphe_ = widget_; + } + }); + } - //--ajout du trigger event au graphe --// + public EbliWidgetControllerGraphe(final EbliWidgetGraphe grapheWidget, final EbliWidgetWithBordure _parent) { + super(_parent); + + widgetGraphe_ = grapheWidget; + + // --ajout du trigger event au graphe --// getGraphe().addTriggerEvent(this); - + labelTrace_ = (JLabel) CtuluLibSwing.findChildByName(getGraphePanel(), "lbTools"); // getGraphePanel().remove(labelTrace_); @@ -98,7 +93,7 @@ } public void addActionSpecifiques() { - editorAction_ = new EbliActionEditorOneClick<BuPanel>((EbliWidgetGraphe) widget_); + editorAction_ = new EbliActionEditorOneClick<BuPanel>(widgetGraphe_); // -- ajout de l action au widget correspondant --// widget_.getActions().addAction(editorAction_); @@ -142,7 +137,7 @@ // -- on ajoute la legende apres duplication --// - if (((EbliWidgetControllerGraphe) widgetGraphe_.getController()).hasLegende()) { + if (hasLegende()) { controllerDuDuplique.ajoutLegende(); listeNodeUndo.add(widgetGrapheDuplic.getNodeLegende()); @@ -185,56 +180,6 @@ return duplique; } -// @Override -// public void suppression(final ArrayList<EbliNode> listeNodeUndo, final ArrayList<Point> listLocation) { -// -// final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); -// listeNodeUndo.add(n); -// listLocation.add(widget_.convertLocalToScene(widget_.getLocation())); -// // -- on prend la location du node au moment de la suppression pour -// // pouvoir la retablir dans le undo --// -// // n.setPreferedLocation(widget_.getPreferredLocation()); -// -// // -- on enleve le node de la scene --// -// widget_.getEbliScene().removeNode(n); -// -// // -- on supprime le node legende associe --// -// if (hasLegende()) { -// listeNodeUndo.add(widgetGraphe_.getNodeLegende()); -// listLocation.add(widget_.convertLocalToScene(widgetGraphe_.getNodeLegende().getWidget().getLocation())); -// widget_.getEbliScene().removeNode(widgetGraphe_.getNodeLegende()); -// -// // final CtuluCommand commande1=new CommandSupprimer(n, -// // widget_.getEbliScene(), -// // widget_.convertLocalToScene(widget_.getLocation())); -// // final CtuluCommand commande2= new -// // CommandSupprimer(widgetGraphe_.getNodeLegende(), -// // widget_.getEbliScene(), -// // widget_.convertLocalToScene(widgetGraphe_.getNodeLegende -// // ().getWidget().getLocation())); -// // cmd_.addCmd(new CtuluCommand(){ -// // -// // -// // public void redo() { -// // // TODO Auto-generated method stub -// // commande1.redo(); -// // commande2.redo(); -// // } -// // -// // -// // public void undo() { -// // // TODO Auto-generated method stub -// // commande1.undo(); -// // commande2.undo(); -// // } -// // -// // }); -// } -// // -- raffraichissement de la scene --// -// widget_.getEbliScene().refresh(); -// -// } - @Override protected void constructMenuMasquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem = _popup.add("Masquer l'objet"); @@ -249,29 +194,8 @@ if (widgetGraphe_.getNodeLegende() != null) widgetLegendeBordure = widgetGraphe_.getNodeLegende().getWidget() .getParentBordure(); - // EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - // if (n.getCreator().getBordure() != null) { - // // -- on masque le calque --// - // n.getCreator().getBordure().setVisible(false); - // - // widgetUndo1 = n.getCreator().getBordure(); - // - // } else { widgetGrapheBordure.setVisible(false); - // widgetUndo1 = widget_; - - // } - - // -- on masque sa legende associee --// - // if (widgetGraphe_.getNodeLegende().getCreator().getBordure() != null) { - // widgetGraphe_.getNodeLegende().getCreator().getBordure().setVisible(false); - // widgetUndo2 = widgetGraphe_.getNodeLegende().getCreator().getBordure(); - // } else { - // widgetGraphe_.getNodeLegende().getWidget().setVisible(false); - // if (widgetLegendeBordure != null) widgetLegendeBordure.setVisible(false); - // } - // -- creation des comamndes undo/redo pour le masquage --// final ArrayList<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); listeWidget.add(widgetGrapheBordure); @@ -298,28 +222,29 @@ if (!hasLegende()) { // -- creation d'un node legende --// - widgetGraphe_.setNodeLegende(new EbliNodeDefault()); + // -- nom de la legende --// + EbliNodeDefault nodeLegende = new EbliNodeDefault(); + nodeLegende.setTitle("L\xE9gende " + (indiceLegende++)); + + final EbliWidgetCreatorLegende creator = new EbliWidgetCreatorLegende(widgetGraphe_ + .getGraphe(), widget_.getId()); + + nodeLegende.setCreator(creator); + // widgetGraphe_.getNodeLegende().setPreferedLocation(positionLegende); + + widget_.getEbliScene().addNode(nodeLegende); + widgetGraphe_.setNodeLegende(nodeLegende); + final Point positionLegende = new Point(); if (widget_.getParentBordure().getBounds() != null && widget_.getParentBordure().getLocation() != null) { positionLegende.x = widget_.getParentBordure().getLocation().x + widget_.getParentBordure().getBounds().width + 20; positionLegende.y = widget_.getParentBordure().getLocation().y; - widgetGraphe_.getNodeLegende().setPreferredLocation(positionLegende); + nodeLegende.setPreferredLocation(positionLegende); } + nodeLegende.setPreferredSize(widgetGraphe_.getNodeLegende().getWidget().getPreferredSize()); - // -- nom de la legende --// - widgetGraphe_.getNodeLegende().setTitle("L\xE9gende " + (indiceLegende++)); - - final EbliWidgetCreatorLegende creator = new EbliWidgetCreatorLegende(((EbliWidgetGraphe) widget_).getGraphe(), - widget_.getId()); - - widgetGraphe_.getNodeLegende().setCreator(creator); - // widgetGraphe_.getNodeLegende().setPreferedLocation(positionLegende); - - widget_.getEbliScene().addNode(widgetGraphe_.getNodeLegende()); - widgetGraphe_.getNodeLegende().setPreferredSize(widgetGraphe_.getNodeLegende().getWidget().getPreferredSize()); - widget_.getEbliScene().refresh(); // -- reinitialisation des titres de la legendes --// @@ -363,9 +288,6 @@ // -- creation du menu config de la courbe - // _popup.add(new EGConfigureActionPalette(((EbliWidgetGraphe) - // widget_).getGraphe().getModel())); - } /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -31,16 +31,6 @@ EGFillePanel pn_; - // ZEbliCalquesPanel CalquepanelProvenance; - // - // public ZEbliCalquesPanel getCalquepanelProvenance() { - // return CalquepanelProvenance; - // } - // - // public void setCalquepanelProvenance(ZEbliCalquesPanel _calquepanelProvenance) { - // CalquepanelProvenance = _calquepanelProvenance; - // } - public EGGraphe getGraphe() { return pn_.getGraphe(); } @@ -49,12 +39,6 @@ return pn_; } - // - // public void setGraphe(EGGraphe graphe) { - // this.graphe = graphe; - // } - - // EbliWidgetGraphe res; EbliWidgetWithBordure res; public EbliWidgetCreatorGraphe(final EGGraphe _g) { @@ -77,10 +61,12 @@ // -- encapsulation dans la widget bordure // res = new EbliWidgetGraphe(_scene, null, pn_); - res = new EbliWidgetBordureSingle(new EbliWidgetGraphe(_scene, null, pn_)); + EbliWidgetGraphe ebliWidgetGraphe = new EbliWidgetGraphe(_scene, null, pn_); + res = new EbliWidgetBordureSingle(ebliWidgetGraphe); + ebliWidgetGraphe.setController(new EbliWidgetControllerGraphe((EbliWidgetGraphe) res.getIntern(), res)); // ajout des listener d ecoute du graphe - pn_.getGraphe().getModel().addModelListener(new EbliWidgetGrapheController(res)); + pn_.getGraphe().getModel().addModelListener(new EbliWidgetGrapheModelListener(res)); return res; } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -1,16 +1,10 @@ package org.fudaa.ebli.visuallibrary.graphe; -import java.util.List; import java.util.Map; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; -import org.fudaa.ebli.visuallibrary.EbliNode; -import org.fudaa.ebli.visuallibrary.EbliNodeDefault; -import org.fudaa.ebli.visuallibrary.EbliScene; -import org.fudaa.ebli.visuallibrary.EbliWidget; -import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; -import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; +import org.fudaa.ebli.visuallibrary.*; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; public class EbliWidgetCreatorLegende implements EbliWidgetCreator { @@ -40,8 +34,10 @@ public EbliWidget create(final EbliScene _scene) { if (g == null) return null; - res = new EbliWidgetBordureSingle(WidgetLegendeManager.createLegende(g, _scene, null), true, true); - g.getModel().addModelListener(new EbliWidgetGrapheController(res)); + EbliWidget legende = WidgetLegendeManager.createLegende(g, _scene, null); + res = new EbliWidgetBordureSingle(legende, true, true); + legende.setController(new EbliWidgetControllerMenuOnly(res, false)); +// g.getModel().addModelListener(new EbliWidgetGrapheModelListener(res)); return res; } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -101,11 +101,6 @@ return panelGraphe_.getGraphe(); } - // - // public void setGraphe(EGGraphe graphe) { - // this.graphe_ = graphe; - // } - EbliWidgetControllerGraphe controllerGraphe_; public EbliWidgetGraphe(final EbliScene scene, final Point preferredLocation, final EGFillePanel _pn) { super(scene); @@ -114,10 +109,6 @@ panelGraphe_.getGraphe().getModel().addModelListener(this); - // --ajout du controller specifique au graphe --// - controllerGraphe_ = new EbliWidgetControllerGraphe(this, nodeLegende); - this.setController(controllerGraphe_); - } public EbliWidgetGraphe(final EbliScene scene, final Point preferredLocation, final EGGraphe _graphe) { Deleted: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheController.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheController.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheController.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -1,57 +0,0 @@ -package org.fudaa.ebli.visuallibrary.graphe; - - -import org.fudaa.ebli.courbe.EGAxe; -import org.fudaa.ebli.courbe.EGGrapheModelListener; -import org.fudaa.ebli.courbe.EGObject; -import org.fudaa.ebli.visuallibrary.EbliWidget; - -/** - * Controller specifique au graphe. - * @author Adrien Hadoux - * - */ -public class EbliWidgetGrapheController implements EGGrapheModelListener { - EbliWidget w; - - public EbliWidgetGrapheController(final EbliWidget w) { - super(); - this.w = w; - } - - public void structureChanged() { - repaintScene(); - - } - - public void courbeContentChanged(final EGObject _c, final boolean restore) { - repaintScene(); - - } - - public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { - repaintScene(); - - } - - private void repaintScene() { - if (w.getEbliScene().getView() != null) { - // w.revalidate(true); - // w.getScene_().revalidate(true); - w.getEbliScene().getView().repaint(w.convertLocalToScene(w.getBounds())); - } - } - - public void axeContentChanged(final EGAxe _c) { - repaintScene(); - - } - - public void axeAspectChanged(final EGAxe _c) { - - - } - - - -} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheLegende.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheLegende.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -41,45 +41,6 @@ } - // protected Rectangle resizeMaxLegende() { - // this.getGraphics().setFont(getFormeFont()); - // int maxHeight = 0; - // int maxWidth = 0; - // // -- mise a jour de la widget avec la nouvelle font - // final List<Widget> listePlage = getChildren(); - // for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { - // final Widget widget = it.next(); - // // -- test si il s agit d un widget plage --// - // if (widget instanceof EbliWidget && widget.getChildren().size() == 2) { - // final EbliWidget new_widget = (EbliWidget) widget; - // - // EbliWidgetTitle tw = null; - // - // if (new_widget.getChildren().get(0) instanceof EbliWidgetTitle) tw = (EbliWidgetTitle) new_widget - // .getChildren().get(0); - // else if (new_widget.getChildren().get(1) instanceof EbliWidgetTitle) tw = (EbliWidgetTitle) new_widget - // .getChildren().get(1); - // - // if (tw != null) { - // // -- recuperation des tailles des font pour les textes saisies - // - // final FontMetrics ftm = this.getGraphics().getFontMetrics(); - // - // final int newWidth = ftm.stringWidth(tw.getText()); - // final int newHeight = ftm.getHeight(); - // if (maxWidth < newWidth) maxWidth = newWidth; - // maxHeight = newHeight; - // } - // } - // - // } - // final Rectangle newBounds = new Rectangle(); - // newBounds.height /* + */= maxHeight; - // newBounds.width /* + */= maxWidth; - // - // return newBounds; - // } - boolean suppressionOccured = false; public void majSuppression() { @@ -90,73 +51,6 @@ @Override protected void paintWidget() { - // // -- mise a jour de la fonte que si il y a eu une modification --// - // if (oldFont_ != getFormeFont() || suppressionOccured) { - // suppressionOccured = false; - // // -- calcul des max height et width pour resize les composants --// - // final Rectangle newBounds = resizeMaxLegende(); - // - // // -- mise a jour de la widget avec la nouvelle font - // final List<Widget> listePlage = getChildren(); - // for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { - // final Widget widget = it.next(); - // // -- test si il s agit d un widget plage --// - // if (widget instanceof EbliWidget && widget.getChildren().size() == 2) { - // final EbliWidget new_widget = (EbliWidget) widget; - // - // EbliWidgetLine lw = null; - // EbliWidgetTitle tw = null; - // - // if (new_widget.getChildren().get(0) instanceof EbliWidgetLine) lw = (EbliWidgetLine) new_widget - // .getChildren().get(0); - // else tw = (EbliWidgetTitle) new_widget.getChildren().get(0); - // - // if (new_widget.getChildren().get(1) instanceof EbliWidgetLine) lw = (EbliWidgetLine) new_widget - // .getChildren().get(1); - // else tw = (EbliWidgetTitle) new_widget.getChildren().get(1); - // if (lw != null && tw != null) { - // - // tw.getIntern_().setFont(getFormeFont()); - // - // // resize du composant texte - // final Rectangle internBounds = tw.getIntern_().getBounds(); - // // internBounds.height += (getFormeFont().getSize() - - // // oldFont_.getSize()) * 2; - // // internBounds.width += (getFormeFont().getSize() - - // // oldFont_.getSize()) * 12; - // internBounds.width = newBounds.width; - // internBounds.height = (newBounds.height); - // tw.getIntern_().setPreferredBounds(internBounds); - // - // // resize pour le logo: forme carr\xE9 - // final Rectangle boundsLogo = lw.getBounds(); - // // boundsLogo.height = internBounds.height; - // // boundsLogo.width = internBounds.height; - // boundsLogo.height = (newBounds.height); - // boundsLogo.width = (newBounds.height); - // lw.setPreferredBounds(boundsLogo); - // - // } - // } - // - // } - // // Resize de la widget - // - // // Rectangle newBounds = getParentWidget().getBounds(); - // // newBounds.height += (listePlage.size() + 1) * - // // (getFormeFont().getSize() - oldFont_.getSize()) * 2; - // // newBounds.width += (getFormeFont().getSize() - oldFont_.getSize()) * - // // 12; - // // getParentWidget().setPreferredBounds(newBounds); - // final Rectangle newBoundConteneurs = getParentWidget().getBounds(); - // newBoundConteneurs.height = (int) ((listePlage.size() + 1) * newBounds.height * 1.5);// ( - // newBoundConteneurs.width = (int) (newBounds.width * 1.5); - // getParentWidget().setPreferredBounds(newBoundConteneurs); - // getEbliScene().refresh(); - // oldFont_ = getFormeFont(); - // - // } - } @Override @@ -195,8 +89,7 @@ private void updateRectangleToFitToView(final Rectangle rectangle) { final JComponent component = this.getScene().getView(); if (rectangle.x + rectangle.width > component.getWidth()) rectangle.x = component.getWidth() - rectangle.width; - if (rectangle.y + rectangle.height > component.getHeight()) rectangle.y = component.getHeight() - - rectangle.height; + if (rectangle.y + rectangle.height > component.getHeight()) rectangle.y = component.getHeight() - rectangle.height; if (rectangle.x < 0) rectangle.x = 0; if (rectangle.y < 0) rectangle.y = 0; } @@ -207,8 +100,8 @@ } public Rectangle getInitialEditorComponentBounds( - org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget, - BuPanel editor, Rectangle viewBounds) { + org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget, BuPanel editor, + Rectangle viewBounds) { Rectangle rectangle = widget.getScene().convertSceneToView(widget.convertLocalToScene(widget.getBounds())); Copied: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheModelListener.java (from rev 5110, trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheController.java) =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheModelListener.java (rev 0) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheModelListener.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -0,0 +1,67 @@ +package org.fudaa.ebli.visuallibrary.graphe; + +import javax.swing.SwingUtilities; + +import org.fudaa.ctulu.CtuluLibArray; +import org.fudaa.ebli.courbe.EGAxe; +import org.fudaa.ebli.courbe.EGCourbe; +import org.fudaa.ebli.courbe.EGGrapheModelListener; +import org.fudaa.ebli.courbe.EGObject; +import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; + +/** + * Controller specifique au graphe. + * + * @author Adrien Hadoux + */ +public class EbliWidgetGrapheModelListener implements EGGrapheModelListener { + EbliWidgetWithBordure w; + + public EbliWidgetGrapheModelListener(final EbliWidgetWithBordure w) { + super(); + this.w = w; + } + + public void structureChanged() { + repaintScene(); + EbliWidgetGraphe g = (EbliWidgetGraphe) w.getIntern(); + EGCourbe[] courbes = g.getGraphe().getModel().getMainModel().getCourbes(); + //il suffit de faire le test ici: + if (CtuluLibArray.isEmpty(courbes)) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + w.getEbliScene().getController().fireEditStop(w, null); + // getWidget().getEbliScene().refresh(); + w.getController().getCmdManager().addCmd(w.getController().deleteWidget()); + } + }); + } + + } + + public void courbeContentChanged(final EGObject _c, final boolean restore) { + repaintScene(); + + } + + public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { + repaintScene(); + + } + + private void repaintScene() { + w.repaintAll(true); + w.getEbliScene().refresh(); + } + + public void axeContentChanged(final EGAxe _c) { + repaintScene(); + + } + + public void axeAspectChanged(final EGAxe _c) { + + } + +} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -109,8 +109,6 @@ } } - res.setController(new EbliWidgetControllerMenuOnly(res, false)); - // -- prendre en compte le resize automatique --// res.oldFont_ = new Font("Helvetica", Font.BOLD, 40); res.repaint(); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionGraphes.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionGraphes.java 2009-09-17 17:41:03 UTC (rev 5111) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionGraphes.java 2009-09-17 22:32:02 UTC (rev 5112) @@ -11,26 +11,20 @@ import java.util.Map; import java.util.Set; -import javax.swing.BorderFactory; -import javax.swing.DefaultListModel; -import javax.swing.Icon; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.ListSelectionModel; +import javax.swing.*; +import com.memoire.bu.BuDialog; +import com.memoire.bu.BuDialogConfirmation; +import com.memoire.bu.BuScrollPane; + import org.fudaa.ctulu.CtuluCommand; +import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.ProgressionBuAdapter; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ctulu.gui.CtuluTaskOperationGUI; -import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheDuplicator; -import org.fudaa.ebli.courbe.EGGrapheModel; import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -46,10 +40,6 @@ import org.fudaa.fudaa.tr.post.TrPostCourbeTreeModel; import org.fudaa.fudaa.tr.post.TrPostProjet; -import com.memoire.bu.BuDialog; -import com.memoire.bu.BuDialogConfirmation; -import com.memoire.bu.BuScrollPane; - /** * Classe Fusion Widgets des graphes entre eux * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2009-09-18 19:10:46
|
Revision: 5114 http://fudaa.svn.sourceforge.net/fudaa/?rev=5114&view=rev Author: hadouxad Date: 2009-09-18 19:10:34 +0000 (Fri, 18 Sep 2009) Log Message: ----------- PREPRO 10 et 7: - ne conserver que les actions utiles pour l'origine et le rejoue (deplacement,zoom,grille) pour la vue 2d - pour le rejoue de donn?\195?\169es, avoir en plus la fonctionnalit?\195?\169 de sonde et de recherche de point Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/CalqueActionInteraction.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java 2009-09-17 22:48:32 UTC (rev 5113) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java 2009-09-18 19:10:34 UTC (rev 5114) @@ -59,17 +59,23 @@ mouseDragged(_e); } + /** + * Ralise l'action de clic d une sonde. + * PRePRO 7 + * @param pt + * @param add + */ + public void moveEvent(GrPoint pt,boolean add,boolean autoAppliqueTranslation){ + if(autoAppliqueTranslation) + pt.autoApplique(((BCalque)target_).getVersReel()); + target_.changeSonde(pt,add); + notifySondeListener(pt); + } + public void mouseDragged(final MouseEvent _e){ if (target_ != null && !isGele()){ final GrPoint pt=new GrPoint(_e.getX(),_e.getY(),0); - // final GrPoint clone = new GrPoint(pt); - pt.autoApplique(((BCalque)target_).getVersReel()); - - - target_.changeSonde(pt,_e.isShiftDown()); - - // -- notify aux sondeListener --// - notifySondeListener(pt); + moveEvent(pt, _e.isShiftDown(),true); } } Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2009-09-17 22:48:32 UTC (rev 5113) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2009-09-18 19:10:34 UTC (rev 5114) @@ -506,15 +506,7 @@ } public List<EbliActionInterface> getActions() { - final List<EbliActionInterface> actions = new ArrayList<EbliActionInterface>(); - buildActions(); - actions.addAll(Arrays.asList(selectedActionGroup_)); - actions.add(null); - actions.addAll(Arrays.asList(navigationActionGroup_)); - actions.add(null); - if (!CtuluLibArray.isEmpty(standardActionGroup_)) { - actions.addAll(Arrays.asList(standardActionGroup_)); - } + final List<EbliActionInterface> actions = getNonSpecificsActions(); initSpecificActions(); if (specificActionGroup_ != null) { actions.addAll(Arrays.asList(specificActionGroup_)); @@ -522,7 +514,29 @@ return actions; } + /** + * Seulement les actions non specifiques d'une vue 2d. + * PREPRO 10. + * @return + */ + public List<EbliActionInterface> getNonSpecificsActions() { + final List<EbliActionInterface> actions = new ArrayList<EbliActionInterface>(); + buildActions(); + actions.addAll(Arrays.asList(selectedActionGroup_)); + actions.add(null); + actions.addAll(Arrays.asList(navigationActionGroup_)); + actions.add(null); + if (!CtuluLibArray.isEmpty(standardActionGroup_)) { + actions.addAll(Arrays.asList(standardActionGroup_)); + } + + return actions; + } + + + + /** * @param _name le nom de l'action a trouver: Action.ACTION_COMMAND_KEY * @return l'action trouvee ou null sinon */ Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/CalqueActionInteraction.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/CalqueActionInteraction.java 2009-09-17 22:48:32 UTC (rev 5113) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/CalqueActionInteraction.java 2009-09-18 19:10:34 UTC (rev 5114) @@ -43,7 +43,15 @@ bc_.setGele(!super.isSelected()); } - public void propertyChange(final PropertyChangeEvent _evt){ + public BCalqueInteraction getBc_() { + return bc_; +} + +public void setBc_(BCalqueInteraction bc_) { + this.bc_ = bc_; +} + +public void propertyChange(final PropertyChangeEvent _evt){ if (isSelected() == bc_.isGele()) { super.setSelected(!bc_.isGele()); } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2009-09-17 22:48:32 UTC (rev 5113) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2009-09-18 19:10:34 UTC (rev 5114) @@ -36,6 +36,7 @@ import org.fudaa.dodico.ef.EfGridVolumeInterface; import org.fudaa.ebli.calque.BGroupeCalque; import org.fudaa.ebli.calque.ZCalqueAffichageDonneesInterface; +import org.fudaa.ebli.calque.ZCalqueSondeInteraction; import org.fudaa.ebli.calque.ZCalqueSondeInterface; import org.fudaa.ebli.calque.edition.ZCalqueEditionGroup; import org.fudaa.ebli.controle.BSelecteurReduitFonteNewVersion; @@ -466,6 +467,16 @@ } /** + * methode qui permet d'ajouter une sonde dans le calque donn\xE9. + * @param pointToAdd + */ + public void addSondeToCalque(GrPoint pointToAdd){ + ZCalqueSondeInteraction interactionSonde= getController().addCalqueSondeInteraction(); + interactionSonde.moveEvent(pointToAdd, true,false); + + } + + /** * Retourne la ligne brisee formee par les sondes. * On peut creer plusieurs sondes en maintenant shift appuy\xE9. * @return @@ -475,7 +486,9 @@ final ZCalqueSondeInterface s = (ZCalqueSondeInterface) getCalqueActif(); if(s !=null && s.getLigneBriseeFromSondes()!=null && s.getLigneBriseeFromSondes().size()>1) return s.getLigneBriseeFromSondes(); + } + return null; } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2009-09-17 22:48:32 UTC (rev 5113) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2009-09-18 19:10:34 UTC (rev 5114) @@ -440,6 +440,20 @@ return (TrPostCommonImplementation) getImpl(); } + + CalqueActionSonde actionSonde=null; + /** + * Action qui recupere la sonde comme action. + * @return + */ + public CalqueActionSonde getSondeAction(){ + if(actionSonde==null){ + final ZCalqueSondeInteraction sonde = getController().addCalqueSondeInteraction(); + actionSonde= new CalqueActionSonde(sonde, getArbreCalqueModel()); + } + return actionSonde; + } + @Override protected void initButtonGroupSpecific(final List _l, final ZEbliCalquePanelController _res) { EbliActionPaletteAbstract plTime; @@ -461,9 +475,9 @@ thisMap.put(ks, "VARIABLE_CHOOSE"); m.put("VARIABLE_CHOOSE", plTime); - final ZCalqueSondeInteraction sonde = _res.addCalqueSondeInteraction(); - _l.add(new CalqueActionSonde(sonde, getArbreCalqueModel())); - +// final ZCalqueSondeInteraction sonde = _res.addCalqueSondeInteraction(); +// _l.add(new CalqueActionSonde(sonde, getArbreCalqueModel())); + _l.add(getSondeAction()); // _l.add(new MvProfileAction(getProjet(), getImpl(), this)); _l.add(new TrPostProfileAction(this)); _l.add(new EvolutionAction(getSource().isRubar())); Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java 2009-09-17 22:48:32 UTC (rev 5113) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java 2009-09-18 19:10:34 UTC (rev 5114) @@ -30,6 +30,7 @@ import org.fudaa.ebli.calque.ZCalqueAffichageDonnees; import org.fudaa.ebli.calque.ZCalqueLigneBrisee; import org.fudaa.ebli.calque.ZCalquePoint; +import org.fudaa.ebli.calque.action.CalqueActionSonde; import org.fudaa.ebli.calque.action.EbliCalqueActionTimeChooser; import org.fudaa.ebli.calque.edition.BPaletteEdition; import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeDefault; @@ -139,12 +140,20 @@ BSelecteurListComboBox comboVar_=null; + /** + * Methode qui epure la toolbar de toutes les options qui ne sont pas utiles. + * Utilis\xE9es pour les modes origines qui n'ont besoin + * @param toolBar + */ + public void epurerToolBar(JToolBar toolBar){ + + } public JToolBar constructToolBarVue2d(final TrPostVisuPanel vue2d,boolean modeEdition){ JToolBar toolbarCalque = new BuToolBar(); AbstractButton boutonSelection=null; //final EbliActionInterface[] actions =vue2d.getController().getSelectedNavigationAndStandardActionGroup(); - final List actions = vue2d.getController().getActions();//getSelectedNavigationAndStandardActionGroup(); + final List actions = vue2d.getController().getNonSpecificsActions();//getSelectedNavigationAndStandardActionGroup(); int i=0; for (final Iterator iterator = actions.iterator(); iterator.hasNext();) { // for (int i=0;i<actions.length;i++) { @@ -176,6 +185,8 @@ toolbarCalque.add(action); + toolbarCalque.add(vue2d.getSondeAction()); + //-- activer par d\xE9faut l'action selection de points --// if(boutonSelection!=null) boutonSelection.doClick(); @@ -496,6 +507,9 @@ } + + + TrReplayDialog dialog_=null; /** * Constructeur d'une dialog qui affiche la vue 2d avec le point initial qui a servi a la creation du modele. @@ -505,6 +519,9 @@ */ public void getEvolTemporelleReplayData(TrPostSource srcChoisie,final TrPostCourbeTreeModel treeModel,final TrPostCourbeModel modele,final TrPostCommonImplementation implementation){ + boolean restartFormBeginning=true; + GrPoint replayPOint=new GrPoint(); + boolean isInterpolated=(modele instanceof TrPostCourbeModel.Interpolated); //-- on cree une vue 2d a partir du fichier source fourni et on le centre sur le point interpol\xE9 ou non --// @@ -526,8 +543,8 @@ } //-- ajout des coordonnees --// collectionPoint.add(coordonneesPoint.x, coordonneesPoint.y,0); + replayPOint.setCoordonnees(coordonneesPoint.x, coordonneesPoint.y,0); - ZModelePointEditable modelePointEdit=new ZModelePointEditable(collectionPoint); //-- creation du calque @@ -548,6 +565,8 @@ //vue2d.addCalque(layer2, true); + + //-- creation du panel de choix des variables a selectionner --// rejouerSrc_=new BuButton(); @@ -589,7 +608,12 @@ //-- on positionne la bonne variable et le bon pas de temps --// comboVar_.getCb().setSelectedItem(modele.var_); + //-- on initialise la sonde --// + //-- PREPRO 7 --// + vue2d.getSondeAction().actionPerformed(null); + vue2d.addSondeToCalque(replayPOint); + //-- on cr\xE9e le bouton de rejoue de donn\xE9es pour un autre fichier r\xE9sultat --// boolean restaurationInitiale=true; @@ -724,11 +748,11 @@ public void getProfilSpatialReplayData( TrPostSource srcChoisie,final MvProfileTreeModel treeModel,final MVProfileCourbeModel modele,final TrPostCommonImplementation implementation){ //-- on cree une vue 2d a partir du fichier source fourni et on le centre sur le point interpol\xE9 ou non --// - TrPostVisuPanel vue2d=constructVue2d(implementation,srcChoisie); + final TrPostVisuPanel vue2d=constructVue2d(implementation,srcChoisie); //-- on affiche sur la vue 2d les points initialement choisis --// GISZoneCollectionPoint collectionPoint=new GISZoneCollectionPoint(); - LineString listePoints=modele.getBuilder().getInitLine(); + final LineString listePoints=modele.getBuilder().getInitLine(); //-- ajout des coordonnees --// if(listePoints!=null){ Object[][] dataP=new Object[listePoints.getNumPoints()][2]; @@ -794,8 +818,20 @@ vue2d.restaurer(); + //-- on initialise la sonde --// + //-- PREPRO 7 --// + vue2d.getSondeAction().actionPerformed(null); + SwingUtilities.invokeLater(new Runnable(){ + public void run() { + if(listePoints!=null){ + for(int i=0;i<listePoints.getNumPoints();i++){ + GrPoint replayPOint=new GrPoint(listePoints.getCoordinateN(i).x,listePoints.getCoordinateN(i).y,0); + vue2d.addSondeToCalque(replayPOint); + } + } + } + }); - //-- on positionne la bonne variable et le bon pas de temps --// comboVar_.getCb().setSelectedItem(modele.getVariable()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2009-09-20 21:18:22
|
Revision: 5118 http://fudaa.svn.sourceforge.net/fudaa/?rev=5118&view=rev Author: deniger Date: 2009-09-20 21:17:02 +0000 (Sun, 20 Sep 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/lido/DParametresLido.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClient.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClientTexte.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/TestHydraulique1dLido.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGModel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGrapheLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoImport.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Profil.java Added Paths: ----------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/conv/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/conv/Conv1D.java Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/conv/Conv1D.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/conv/Conv1D.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/metier/conv/Conv1D.java 2009-09-20 21:17:02 UTC (rev 5118) @@ -0,0 +1,326 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.hydraulique1d.metier.conv; + +import java.io.*; + +import org.fudaa.dodico.corba.lido.SParametresBiefBlocPRO; +import org.fudaa.dodico.corba.lido.SParametresDonBiefBlocPRO; +import org.fudaa.dodico.corba.lido.SParametresPRO; +import org.fudaa.dodico.fortran.FortranReader; +import org.fudaa.dodico.objet.CExec; + +public class Conv1D { + + public final static boolean DEBUG = "yes".equals(System.getProperty("fudaa.debug")); + + // .PRO *********************** + public static SParametresPRO litParametresPRO(File fichier, int nbBiefs) throws IOException { + // return litParametresPRO(fichier, nbBiefs, -1); + // } + // + // public static SParametresPRO litParametresPRO(File fichier, int nbBiefs, int nbColonnes) throws IOException { + SParametresPRO params = new SParametresPRO(); + // initialisation par defaut pour permettre aux structures, et champs d'etres serialisees + params.titrePRO = new String[0]; + params.profilsBief = new SParametresBiefBlocPRO[0]; + params.donneesBief = new SParametresDonBiefBlocPRO[0]; + FortranReader fpro = new FortranReader(new FileReader(fichier)); + if (fpro.ready()) { + params.status = true; + System.out.println("Lecture du fichier " + fichier.getName()); + int[] fmt = new int[] { 72 }; + params.titrePRO = new String[6]; + for (int i = 0; i < 6; i++) { + params.titrePRO[i] = new String(fpro.readLine()).trim(); + } + fpro.readFields(); + params.entreeProfils = fpro.intField(1); + // ATTENTION: si profils par largeur, on convertit le fichier avec + // une moulinette specialisee et on recommence + if (params.entreeProfils != 1) { + System.err.println("ATTENTION: fichier PRO par largeurs => conversion"); + fpro.close(); + File newFichier = Conv1D.convertitPROLargeur(fichier); + return litParametresPRO(newFichier, nbBiefs); + } + fpro.readFields(); + params.zoneStock = fpro.intField(1); + fpro.readFields(); + params.nbProfils = fpro.intField(1); + params.profilsBief = new SParametresBiefBlocPRO[params.nbProfils]; + for (int i = 0; i < params.nbProfils; i++) { + if (DEBUG) System.err.println("profil " + (i + 1)); + fpro.readFields(); // Ligne de separation + params.profilsBief[i] = new SParametresBiefBlocPRO(); + params.profilsBief[i].indice = i; + fpro.readFields(); + params.profilsBief[i].numProfil = fpro.stringField(0).trim(); + params.profilsBief[i].abscisse = fpro.doubleField(2); + fpro.readFields(); + if (params.entreeProfils == 1) { + // Profils entres par points + params.profilsBief[i].altMinMaj = new double[0]; + params.profilsBief[i].absMajMin = new double[2]; + params.profilsBief[i].absMajMin[0] = fpro.doubleField(1); + params.profilsBief[i].absMajMin[1] = fpro.doubleField(2); + params.profilsBief[i].coefStrickMajMin = fpro.doubleField(4); + fpro.readFields(); + params.profilsBief[i].altMajSto = new double[0]; + params.profilsBief[i].absMajSto = new double[2]; + params.profilsBief[i].absMajSto[0] = fpro.doubleField(1); + params.profilsBief[i].absMajSto[1] = fpro.doubleField(2); + params.profilsBief[i].coefStrickMajSto = fpro.doubleField(4); + } else { + // Profils entres par largeurs + params.profilsBief[i].absMajMin = new double[0]; + params.profilsBief[i].altMinMaj = new double[2]; + params.profilsBief[i].altMinMaj[0] = fpro.doubleField(1); + params.profilsBief[i].altMinMaj[1] = fpro.doubleField(2); + params.profilsBief[i].coefStrickMajMin = fpro.doubleField(4); + fpro.readFields(); + params.profilsBief[i].absMajSto = new double[0]; + params.profilsBief[i].altMajSto = new double[2]; + params.profilsBief[i].altMajSto[0] = fpro.doubleField(1); + params.profilsBief[i].altMajSto[1] = fpro.doubleField(2); + params.profilsBief[i].coefStrickMajSto = fpro.doubleField(4); + } + fpro.readFields(); + params.profilsBief[i].coteRivGa = fpro.doubleField(1); + params.profilsBief[i].coteRivDr = fpro.doubleField(2); + fpro.readFields(); + params.profilsBief[i].nbPoints = fpro.intField(1); + fpro.readFields(); + params.profilsBief[i].abs = new double[params.profilsBief[i].nbPoints]; + params.profilsBief[i].cotes = new double[params.profilsBief[i].nbPoints]; + // if( nbColonnes==-1 ) { + // System.err.print("Test du format du fichier "+fichier.getName()+" : "); + // fpro.readFields(); + // nbColonnes=fpro.getNumberOfFields(); + // System.err.println(""+nbColonnes); + // fpro.close(); + // return litParametresPRO(fichier, nbBiefs, nbColonnes); + // } + // + // int cmpt = nbColonnes; + int j = 0; + if (DEBUG) System.err.print("abs: "); + while (j < params.profilsBief[i].nbPoints) { + // for(int j=0; j<params.profilsBief[i].nbPoints; j++) { + fpro.readFields(); + int cmpt = fpro.getNumberOfFields(); + // if(cmpt > (nbColonnes-1)) { + // fpro.readFields(); + // cmpt = 0; + // } + for (int ci = 0; ci < cmpt; ci++) { + if (j < params.profilsBief[i].abs.length) { + params.profilsBief[i].abs[j++] = fpro.doubleField(ci); + if (DEBUG) System.err.print(fpro.doubleField(ci) + " "); + } + } + } + if (DEBUG) System.err.println(); + fpro.readFields(); + j = 0; + // cmpt = nbColonnes; + if (DEBUG) System.err.print("cot: "); + while (j < params.profilsBief[i].nbPoints) { + // for(int j=0; j<params.profilsBief[i].nbPoints; j++) { + fpro.readFields(); + int cmpt = fpro.getNumberOfFields(); + // if(cmpt > (nbColonnes-1)) { + // fpro.readFields(); + // cmpt = 0; + // } + for (int ci = 0; ci < cmpt; ci++) { + if (j < params.profilsBief[i].cotes.length) { + params.profilsBief[i].cotes[j++] = fpro.doubleField(ci); + if (DEBUG) System.err.print(fpro.doubleField(ci) + " "); + } + } + } + if (DEBUG) System.err.println(); + } + // rajouter un point extremite si necessaire pour + // que les deux bords du profil soient a la meme cote + Conv1D.normaliseProfils(params.profilsBief); + fpro.readFields(fmt); + params.donneesBief = new SParametresDonBiefBlocPRO[nbBiefs]; + for (int i = 0; i < nbBiefs; i++) { + fpro.readFields(); + params.donneesBief[i] = new SParametresDonBiefBlocPRO(); + params.donneesBief[i].premierProfilAmont = fpro.intField(1); + params.donneesBief[i].distancePremierDernierProfil = fpro.doubleField(3); + } + } else { + System.out.println("Fichier " + fichier.getName() + " vide !"); + params.status = false; + } + fpro.close(); + return params; + } + + public static synchronized File convertitPROLargeur(File fic) throws IOException { + String os = System.getProperty("os.name"); + String path = System.getProperty("FUDAA_SERVEUR"); + if ((path == null) || path.equals("")) path = "serveurs" + File.separator + "lido"; + if (!path.endsWith(File.separator)) path += File.separator; + // copie du fichier + BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fic))); + String nomCopie = "pierre.pro"; + File copie = new File(path + nomCopie); + copie.deleteOnExit(); + BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(copie))); + String line = in.readLine(); + while (line != null) { + out.write(line, 0, line.length()); + out.newLine(); + line = in.readLine(); + } + in.close(); + out.close(); + System.out.println("Appel de l'executable de conversion PROLARPO"); + String[] cmd; + if (os.startsWith("Windows")) { + cmd = new String[4]; + cmd[0] = path + "prolarpo-win.bat"; + if (path.indexOf(':') != -1) { + // lettre de l'unite (ex: "C:") + cmd[1] = path.substring(0, path.indexOf(':') + 1); + // chemin du serveur + cmd[2] = path.substring(path.indexOf(':') + 1); + } else { + // si pas de lettre dans le chemin + cmd[1] = "fake_cmd"; + cmd[2] = path; + } + cmd[3] = copie.getName(); + cmd[3] = cmd[3].substring(0, cmd[3].lastIndexOf('.')); + System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2] + " " + cmd[3]); + } else { + cmd = new String[3]; + cmd[0] = path + "prolarpo.sh"; + cmd[1] = path; + cmd[2] = copie.getName(); + cmd[2] = cmd[2].substring(0, cmd[2].lastIndexOf('.')); + System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2]); + } + CExec ex = new CExec(); + ex.setCommand(cmd); + ex.setOutStream(System.out); + ex.setErrStream(System.err); + ex.exec(); + String nomFichierProduit = copie.getAbsolutePath(); + nomFichierProduit = nomFichierProduit + "2"; + File res = new File(nomFichierProduit); + res.deleteOnExit(); + return res; + } + + public static synchronized SParametresPRO importationLIDO1_1(File fic) throws IOException { + String os = System.getProperty("os.name"); + String path = System.getProperty("FUDAA_SERVEUR"); + // String drive; + if ((path == null) || path.equals("")) path = "serveurs" + File.separator + "lido"; + if (!path.endsWith(File.separator)) path += File.separator; + // copie du fichier + /* + * FileInputStream in=new FileInputStream(fic); File copie=new File(path+fic.getName()); copie.deleteOnExit(); + * FileOutputStream out=new FileOutputStream(copie); byte[] data=new byte[1024]; int read=in.read(data); while( + * read>-1 ) { out.write(data); read=in.read(data); } in.close(); out.close(); + */ + BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fic))); + String nomCopie = fic.getName(); + nomCopie = nomCopie.substring(0, nomCopie.lastIndexOf('.')) + ".pro"; + File copie = new File(path + nomCopie); + copie.deleteOnExit(); + BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(copie))); + String line = in.readLine(); + while (line != null) { + out.write(line, 0, line.length()); + out.newLine(); + line = in.readLine(); + } + in.close(); + out.close(); + System.out.println("Appel de l'executable de conversion MODGEO"); + String[] cmd; + if (os.startsWith("Windows")) { + cmd = new String[4]; + cmd[0] = path + "modgeo-win.bat"; + if (path.indexOf(':') != -1) { + // lettre de l'unite (ex: "C:") + cmd[1] = path.substring(0, path.indexOf(':') + 1); + // chemin du serveur + cmd[2] = path.substring(path.indexOf(':') + 1); + } else { + // si pas de lettre dans le chemin + cmd[1] = "fake_cmd"; + cmd[2] = path; + } + cmd[3] = copie.getName(); + cmd[3] = cmd[3].substring(0, cmd[3].lastIndexOf('.')); + System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2] + " " + cmd[3]); + } else { + cmd = new String[3]; + cmd[0] = path + "modgeo.sh"; + cmd[1] = path; + cmd[2] = copie.getName(); + cmd[2] = cmd[2].substring(0, cmd[2].lastIndexOf('.')); + System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2]); + } + CExec ex = new CExec(); + ex.setCommand(cmd); + ex.setOutStream(System.out); + ex.setErrStream(System.err); + ex.exec(); + String nomFichierProduit = copie.getAbsolutePath() + ".2"; + // nomFichierProduit=nomFichierProduit.substring(0, nomFichierProduit.lastIndexOf('.')-1)+"2.pro"; + new File(nomFichierProduit).deleteOnExit(); + return litParametresPRO(new File(nomFichierProduit), 0); + } + + public static boolean normaliseProfils(SParametresBiefBlocPRO[] profilsBief) { + if (profilsBief == null) return false; + boolean res = false; + System.err.println("normalisation des profils"); + for (int i = 0; i < profilsBief.length; i++) { + if (profilsBief[i].cotes.length > 0) { + if (profilsBief[i].cotes[0] < profilsBief[i].cotes[profilsBief[i].cotes.length - 1]) { + double[] tmpCotes = new double[profilsBief[i].cotes.length + 1]; + double[] tmpAbs = new double[profilsBief[i].cotes.length + 1]; + tmpCotes[0] = profilsBief[i].cotes[profilsBief[i].cotes.length - 1]; + tmpAbs[0] = profilsBief[i].abs[0]; + for (int j = 0; j < profilsBief[i].cotes.length; j++) { + tmpCotes[j + 1] = profilsBief[i].cotes[j]; + tmpAbs[j + 1] = profilsBief[i].abs[j]; + } + profilsBief[i].cotes = tmpCotes; + profilsBief[i].abs = tmpAbs; + profilsBief[i].nbPoints++; + // res = res || true; + res = true; + } else if (profilsBief[i].cotes[0] > profilsBief[i].cotes[profilsBief[i].cotes.length - 1]) { + double[] tmpCotes = new double[profilsBief[i].cotes.length + 1]; + double[] tmpAbs = new double[profilsBief[i].cotes.length + 1]; + for (int j = 0; j < profilsBief[i].cotes.length; j++) { + tmpCotes[j] = profilsBief[i].cotes[j]; + tmpAbs[j] = profilsBief[i].abs[j]; + } + tmpCotes[profilsBief[i].cotes.length] = profilsBief[i].cotes[0]; + tmpAbs[profilsBief[i].cotes.length] = profilsBief[i].abs[profilsBief[i].cotes.length - 1]; + profilsBief[i].cotes = tmpCotes; + profilsBief[i].abs = tmpAbs; + profilsBief[i].nbPoints++; + // res = res || true; + res = true; + } + } + } + return res; + } + +} Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/lido/DParametresLido.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/lido/DParametresLido.java 2009-09-20 21:00:35 UTC (rev 5117) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/lido/DParametresLido.java 2009-09-20 21:17:02 UTC (rev 5118) @@ -8,16 +8,11 @@ */ package org.fudaa.dodico.lido; -import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; import org.fudaa.dodico.calcul.DParametres; import org.fudaa.dodico.corba.lido.IParametresLido; import org.fudaa.dodico.corba.lido.IParametresLidoOperations; @@ -35,7 +30,6 @@ import org.fudaa.dodico.corba.lido.SParametresCLM; import org.fudaa.dodico.corba.lido.SParametresCondLimBlocCLM; import org.fudaa.dodico.corba.lido.SParametresCondLimPointLigneCLM; -import org.fudaa.dodico.corba.lido.SParametresDonBiefBlocPRO; import org.fudaa.dodico.corba.lido.SParametresEXT; import org.fudaa.dodico.corba.lido.SParametresFIC; import org.fudaa.dodico.corba.lido.SParametresFicCAL; @@ -57,7 +51,6 @@ import org.fudaa.dodico.corba.lido.SParametresTempCAL; import org.fudaa.dodico.fortran.FortranReader; import org.fudaa.dodico.fortran.FortranWriter; -import org.fudaa.dodico.objet.CExec; /** * Les parametres Lido. @@ -66,7 +59,7 @@ * @author Mickael Rubens , Axel von Arnim */ public class DParametresLido extends DParametres implements IParametresLido, IParametresLidoOperations { - private final static boolean DEBUG = "yes".equals(System.getProperty("fudaa.debug")); + public final static boolean DEBUG = "yes".equals(System.getProperty("fudaa.debug")); private SParametresCAL paramsCAL_; private SParametresCLM paramsCLM_; private SParametresFIC paramsFIC_; @@ -1330,313 +1323,6 @@ } } - // .PRO *********************** - public static SParametresPRO litParametresPRO(File fichier, int nbBiefs) throws IOException { - // return litParametresPRO(fichier, nbBiefs, -1); - // } - // - // public static SParametresPRO litParametresPRO(File fichier, int nbBiefs, int nbColonnes) throws IOException { - SParametresPRO params = new SParametresPRO(); - // initialisation par defaut pour permettre aux structures, et champs d'etres serialisees - params.titrePRO = new String[0]; - params.profilsBief = new SParametresBiefBlocPRO[0]; - params.donneesBief = new SParametresDonBiefBlocPRO[0]; - FortranReader fpro = new FortranReader(new FileReader(fichier)); - if (fpro.ready()) { - params.status = true; - System.out.println("Lecture du fichier " + fichier.getName()); - int[] fmt = new int[] { 72 }; - params.titrePRO = new String[6]; - for (int i = 0; i < 6; i++) { - params.titrePRO[i] = new String(fpro.readLine()).trim(); - } - fpro.readFields(); - params.entreeProfils = fpro.intField(1); - // ATTENTION: si profils par largeur, on convertit le fichier avec - // une moulinette specialisee et on recommence - if (params.entreeProfils != 1) { - System.err.println("ATTENTION: fichier PRO par largeurs => conversion"); - fpro.close(); - File newFichier = convertitPROLargeur(fichier); - return litParametresPRO(newFichier, nbBiefs); - } - fpro.readFields(); - params.zoneStock = fpro.intField(1); - fpro.readFields(); - params.nbProfils = fpro.intField(1); - params.profilsBief = new SParametresBiefBlocPRO[params.nbProfils]; - for (int i = 0; i < params.nbProfils; i++) { - if (DEBUG) System.err.println("profil " + (i + 1)); - fpro.readFields(); // Ligne de separation - params.profilsBief[i] = new SParametresBiefBlocPRO(); - params.profilsBief[i].indice = i; - fpro.readFields(); - params.profilsBief[i].numProfil = fpro.stringField(0).trim(); - params.profilsBief[i].abscisse = fpro.doubleField(2); - fpro.readFields(); - if (params.entreeProfils == 1) { - // Profils entres par points - params.profilsBief[i].altMinMaj = new double[0]; - params.profilsBief[i].absMajMin = new double[2]; - params.profilsBief[i].absMajMin[0] = fpro.doubleField(1); - params.profilsBief[i].absMajMin[1] = fpro.doubleField(2); - params.profilsBief[i].coefStrickMajMin = fpro.doubleField(4); - fpro.readFields(); - params.profilsBief[i].altMajSto = new double[0]; - params.profilsBief[i].absMajSto = new double[2]; - params.profilsBief[i].absMajSto[0] = fpro.doubleField(1); - params.profilsBief[i].absMajSto[1] = fpro.doubleField(2); - params.profilsBief[i].coefStrickMajSto = fpro.doubleField(4); - } else { - // Profils entres par largeurs - params.profilsBief[i].absMajMin = new double[0]; - params.profilsBief[i].altMinMaj = new double[2]; - params.profilsBief[i].altMinMaj[0] = fpro.doubleField(1); - params.profilsBief[i].altMinMaj[1] = fpro.doubleField(2); - params.profilsBief[i].coefStrickMajMin = fpro.doubleField(4); - fpro.readFields(); - params.profilsBief[i].absMajSto = new double[0]; - params.profilsBief[i].altMajSto = new double[2]; - params.profilsBief[i].altMajSto[0] = fpro.doubleField(1); - params.profilsBief[i].altMajSto[1] = fpro.doubleField(2); - params.profilsBief[i].coefStrickMajSto = fpro.doubleField(4); - } - fpro.readFields(); - params.profilsBief[i].coteRivGa = fpro.doubleField(1); - params.profilsBief[i].coteRivDr = fpro.doubleField(2); - fpro.readFields(); - params.profilsBief[i].nbPoints = fpro.intField(1); - fpro.readFields(); - params.profilsBief[i].abs = new double[params.profilsBief[i].nbPoints]; - params.profilsBief[i].cotes = new double[params.profilsBief[i].nbPoints]; - // if( nbColonnes==-1 ) { - // System.err.print("Test du format du fichier "+fichier.getName()+" : "); - // fpro.readFields(); - // nbColonnes=fpro.getNumberOfFields(); - // System.err.println(""+nbColonnes); - // fpro.close(); - // return litParametresPRO(fichier, nbBiefs, nbColonnes); - // } - // - // int cmpt = nbColonnes; - int j = 0; - if (DEBUG) System.err.print("abs: "); - while (j < params.profilsBief[i].nbPoints) { - // for(int j=0; j<params.profilsBief[i].nbPoints; j++) { - fpro.readFields(); - int cmpt = fpro.getNumberOfFields(); - // if(cmpt > (nbColonnes-1)) { - // fpro.readFields(); - // cmpt = 0; - // } - for (int ci = 0; ci < cmpt; ci++) { - if (j < params.profilsBief[i].abs.length) { - params.profilsBief[i].abs[j++] = fpro.doubleField(ci); - if (DEBUG) System.err.print(fpro.doubleField(ci) + " "); - } - } - } - if (DEBUG) System.err.println(); - fpro.readFields(); - j = 0; - // cmpt = nbColonnes; - if (DEBUG) System.err.print("cot: "); - while (j < params.profilsBief[i].nbPoints) { - // for(int j=0; j<params.profilsBief[i].nbPoints; j++) { - fpro.readFields(); - int cmpt = fpro.getNumberOfFields(); - // if(cmpt > (nbColonnes-1)) { - // fpro.readFields(); - // cmpt = 0; - // } - for (int ci = 0; ci < cmpt; ci++) { - if (j < params.profilsBief[i].cotes.length) { - params.profilsBief[i].cotes[j++] = fpro.doubleField(ci); - if (DEBUG) System.err.print(fpro.doubleField(ci) + " "); - } - } - } - if (DEBUG) System.err.println(); - } - // rajouter un point extremite si necessaire pour - // que les deux bords du profil soient a la meme cote - normaliseProfils(params.profilsBief); - fpro.readFields(fmt); - params.donneesBief = new SParametresDonBiefBlocPRO[nbBiefs]; - for (int i = 0; i < nbBiefs; i++) { - fpro.readFields(); - params.donneesBief[i] = new SParametresDonBiefBlocPRO(); - params.donneesBief[i].premierProfilAmont = fpro.intField(1); - params.donneesBief[i].distancePremierDernierProfil = fpro.doubleField(3); - } - } else { - System.out.println("Fichier " + fichier.getName() + " vide !"); - params.status = false; - } - fpro.close(); - return params; - } - - public static boolean normaliseProfils(SParametresBiefBlocPRO[] profilsBief) { - if (profilsBief == null) return false; - boolean res = false; - System.err.println("normalisation des profils"); - for (int i = 0; i < profilsBief.length; i++) { - if (profilsBief[i].cotes.length > 0) { - if (profilsBief[i].cotes[0] < profilsBief[i].cotes[profilsBief[i].cotes.length - 1]) { - double[] tmpCotes = new double[profilsBief[i].cotes.length + 1]; - double[] tmpAbs = new double[profilsBief[i].cotes.length + 1]; - tmpCotes[0] = profilsBief[i].cotes[profilsBief[i].cotes.length - 1]; - tmpAbs[0] = profilsBief[i].abs[0]; - for (int j = 0; j < profilsBief[i].cotes.length; j++) { - tmpCotes[j + 1] = profilsBief[i].cotes[j]; - tmpAbs[j + 1] = profilsBief[i].abs[j]; - } - profilsBief[i].cotes = tmpCotes; - profilsBief[i].abs = tmpAbs; - profilsBief[i].nbPoints++; - // res = res || true; - res = true; - } else if (profilsBief[i].cotes[0] > profilsBief[i].cotes[profilsBief[i].cotes.length - 1]) { - double[] tmpCotes = new double[profilsBief[i].cotes.length + 1]; - double[] tmpAbs = new double[profilsBief[i].cotes.length + 1]; - for (int j = 0; j < profilsBief[i].cotes.length; j++) { - tmpCotes[j] = profilsBief[i].cotes[j]; - tmpAbs[j] = profilsBief[i].abs[j]; - } - tmpCotes[profilsBief[i].cotes.length] = profilsBief[i].cotes[0]; - tmpAbs[profilsBief[i].cotes.length] = profilsBief[i].abs[profilsBief[i].cotes.length - 1]; - profilsBief[i].cotes = tmpCotes; - profilsBief[i].abs = tmpAbs; - profilsBief[i].nbPoints++; - // res = res || true; - res = true; - } - } - } - return res; - } - - private static synchronized File convertitPROLargeur(File fic) throws IOException { - String os = System.getProperty("os.name"); - String path = System.getProperty("FUDAA_SERVEUR"); - if ((path == null) || path.equals("")) path = "serveurs" + File.separator + "lido"; - if (!path.endsWith(File.separator)) path += File.separator; - // copie du fichier - BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fic))); - String nomCopie = "pierre.pro"; - File copie = new File(path + nomCopie); - copie.deleteOnExit(); - BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(copie))); - String line = in.readLine(); - while (line != null) { - out.write(line, 0, line.length()); - out.newLine(); - line = in.readLine(); - } - in.close(); - out.close(); - System.out.println("Appel de l'executable de conversion PROLARPO"); - String[] cmd; - if (os.startsWith("Windows")) { - cmd = new String[4]; - cmd[0] = path + "prolarpo-win.bat"; - if (path.indexOf(':') != -1) { - // lettre de l'unite (ex: "C:") - cmd[1] = path.substring(0, path.indexOf(':') + 1); - // chemin du serveur - cmd[2] = path.substring(path.indexOf(':') + 1); - } else { - // si pas de lettre dans le chemin - cmd[1] = "fake_cmd"; - cmd[2] = path; - } - cmd[3] = copie.getName(); - cmd[3] = cmd[3].substring(0, cmd[3].lastIndexOf('.')); - System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2] + " " + cmd[3]); - } else { - cmd = new String[3]; - cmd[0] = path + "prolarpo.sh"; - cmd[1] = path; - cmd[2] = copie.getName(); - cmd[2] = cmd[2].substring(0, cmd[2].lastIndexOf('.')); - System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2]); - } - CExec ex = new CExec(); - ex.setCommand(cmd); - ex.setOutStream(System.out); - ex.setErrStream(System.err); - ex.exec(); - String nomFichierProduit = copie.getAbsolutePath(); - nomFichierProduit = nomFichierProduit + "2"; - File res = new File(nomFichierProduit); - res.deleteOnExit(); - return res; - } - - public static synchronized SParametresPRO importationLIDO1_1(File fic) throws IOException { - String os = System.getProperty("os.name"); - String path = System.getProperty("FUDAA_SERVEUR"); - // String drive; - if ((path == null) || path.equals("")) path = "serveurs" + File.separator + "lido"; - if (!path.endsWith(File.separator)) path += File.separator; - // copie du fichier - /* - * FileInputStream in=new FileInputStream(fic); File copie=new File(path+fic.getName()); copie.deleteOnExit(); - * FileOutputStream out=new FileOutputStream(copie); byte[] data=new byte[1024]; int read=in.read(data); while( - * read>-1 ) { out.write(data); read=in.read(data); } in.close(); out.close(); - */ - BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fic))); - String nomCopie = fic.getName(); - nomCopie = nomCopie.substring(0, nomCopie.lastIndexOf('.')) + ".pro"; - File copie = new File(path + nomCopie); - copie.deleteOnExit(); - BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(copie))); - String line = in.readLine(); - while (line != null) { - out.write(line, 0, line.length()); - out.newLine(); - line = in.readLine(); - } - in.close(); - out.close(); - System.out.println("Appel de l'executable de conversion MODGEO"); - String[] cmd; - if (os.startsWith("Windows")) { - cmd = new String[4]; - cmd[0] = path + "modgeo-win.bat"; - if (path.indexOf(':') != -1) { - // lettre de l'unite (ex: "C:") - cmd[1] = path.substring(0, path.indexOf(':') + 1); - // chemin du serveur - cmd[2] = path.substring(path.indexOf(':') + 1); - } else { - // si pas de lettre dans le chemin - cmd[1] = "fake_cmd"; - cmd[2] = path; - } - cmd[3] = copie.getName(); - cmd[3] = cmd[3].substring(0, cmd[3].lastIndexOf('.')); - System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2] + " " + cmd[3]); - } else { - cmd = new String[3]; - cmd[0] = path + "modgeo.sh"; - cmd[1] = path; - cmd[2] = copie.getName(); - cmd[2] = cmd[2].substring(0, cmd[2].lastIndexOf('.')); - System.out.println(cmd[0] + " " + cmd[1] + " " + cmd[2]); - } - CExec ex = new CExec(); - ex.setCommand(cmd); - ex.setOutStream(System.out); - ex.setErrStream(System.err); - ex.exec(); - String nomFichierProduit = copie.getAbsolutePath() + ".2"; - // nomFichierProduit=nomFichierProduit.substring(0, nomFichierProduit.lastIndexOf('.')-1)+"2.pro"; - new File(nomFichierProduit).deleteOnExit(); - return DParametresLido.litParametresPRO(new File(nomFichierProduit), 0); - } - // .RZO public static SParametresRZO litParametresRZO(File fichier) throws IOException { SParametresRZO params = new SParametresRZO(); Modified: trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClient.java =================================================================== --- trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClient.java 2009-09-20 21:00:35 UTC (rev 5117) +++ trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClient.java 2009-09-20 21:17:02 UTC (rev 5118) @@ -12,6 +12,7 @@ import org.fudaa.dodico.corba.lido.SParametresLIG; import org.fudaa.dodico.corba.lido.SParametresRZO; +import org.fudaa.dodico.hydraulique1d.metier.conv.Conv1D; import org.fudaa.dodico.lido.DParametresLido; import org.fudaa.dodico.lido.DResultatsLido; /** @@ -39,7 +40,7 @@ DParametresLido.litParametresRZO( new File("/home/users/rubens/lido_fic/therain99.rzo")); /*pro=*/ - DParametresLido.litParametresPRO( + Conv1D.litParametresPRO( new File("/home/users/rubens/lido_fic/therain99.pro"), rzo.nbBief); cal= Modified: trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClientTexte.java =================================================================== --- trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClientTexte.java 2009-09-20 21:00:35 UTC (rev 5117) +++ trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/LidoClientTexte.java 2009-09-20 21:17:02 UTC (rev 5118) @@ -18,6 +18,7 @@ import org.fudaa.dodico.corba.lido.SParametresRZO; import org.fudaa.dodico.corba.lido.SParametresSNG; +import org.fudaa.dodico.hydraulique1d.metier.conv.Conv1D; import org.fudaa.dodico.lido.DCalculLido; import org.fudaa.dodico.lido.DParametresLido; import org.fudaa.dodico.objet.CDodico; @@ -113,7 +114,7 @@ rzo= DParametresLido.litParametresRZO(new File(path + nomEtu + ".rzo")); pFic.parametresRZO(rzo); pro= - DParametresLido.litParametresPRO( + Conv1D.litParametresPRO( new File(path + nomPro + ".pro"), pFic.parametresRZO().nbBief); pFic.parametresPRO(pro); Modified: trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/TestHydraulique1dLido.java =================================================================== --- trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/TestHydraulique1dLido.java 2009-09-20 21:00:35 UTC (rev 5117) +++ trunk/fudaa_devel/dodico/test/org/fudaa/dodico/lido/TestHydraulique1dLido.java 2009-09-20 21:17:02 UTC (rev 5118) @@ -21,6 +21,7 @@ import org.fudaa.dodico.corba.objet.IPersonne; import org.fudaa.dodico.corba.usine.IUsine; +import org.fudaa.dodico.hydraulique1d.metier.conv.Conv1D; import org.fudaa.dodico.lido.DParametresLido; import org.fudaa.dodico.lido.DResultatsLido; import org.fudaa.dodico.lido.conversion.CConversionHydraulique1d; @@ -61,7 +62,7 @@ plido.parametresCLM(DParametresLido.litParametresCLM(new File("p.clm"))); plido.parametresLIG(DParametresLido.litParametresLIG(new File("p.lig"))); plido.parametresRZO(DParametresLido.litParametresRZO(new File("p.rzo"))); - plido.parametresPRO(DParametresLido.litParametresPRO(new File("p.pro"), plido.parametresRZO().nbBief)); + plido.parametresPRO(Conv1D.litParametresPRO(new File("p.pro"), plido.parametresRZO().nbBief)); plido.parametresSNG(DParametresLido.litParametresSNG(new File("p.sng"))); plido.parametresEXT(new SParametresEXT()); rlido.resultatsRSN(DResultatsLido.litResultatsRSN(new File("p.rsn"), null, plido.parametresRZO().nbBief, plido Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2009-09-20 21:00:35 UTC (rev 5117) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2009-09-20 21:17:02 UTC (rev 5118) @@ -43,1058 +43,1019 @@ */ public abstract class EGCourbe extends EGObject { - private int alpha_ = 255; + private int alpha_ = 255; - private final TraceLigneModel lineModel_; + private final TraceLigneModel lineModel_; - // private double[] markH_; + // private double[] markH_; - + /** + * la liste des valeurs marquees + */ + private List<EGCourbeMarqueur> listeMarqueurs_ = null; - /** - * la liste des valeurs marquees - */ - private List<EGCourbeMarqueur> listeMarqueurs_=null; + private boolean markMaxLine_; - private boolean markMaxLine_; + private boolean markMinLine_; - private boolean markMinLine_; + private EGModel model_; + private TraceLigneModel tLigneMarqueur_; + boolean displayTitleOnCurve_; - private EGModel model_; + Font font_ = CtuluLibSwing.getMiniFont(); - private TraceLigneModel tLigneMarqueur_; + final TraceIconModel iconeModel_; - boolean displayTitleOnCurve_; + EGCourbeSurfacePainter surfacePainter_; - Font font_ = CtuluLibSwing.getMiniFont(); + TraceBox tbox_; - final TraceIconModel iconeModel_; + /** + * @param _model le model a prendre en compte + */ + public EGCourbe(final EGModel _model) { + iconeModel_ = new TraceIconModel(TraceIcon.RIEN, 1, Color.BLACK); + lineModel_ = new TraceLigneModel(); + model_ = _model; - EGCourbeSurfacePainter surfacePainter_; + } - TraceBox tbox_; + private void buildLigneMarqueur() { + if (tLigneMarqueur_ == null) { + tLigneMarqueur_ = new TraceLigneModel(); + tLigneMarqueur_.setTypeTrait(TraceLigne.POINTILLE); + tLigneMarqueur_.setCouleur(lineModel_.getCouleur().brighter()); + } + } - /** - * @param _model le model a prendre en compte - */ - public EGCourbe(final EGModel _model) { - iconeModel_ = new TraceIconModel(TraceIcon.RIEN, 1, Color.BLACK); - lineModel_ = new TraceLigneModel(); - model_ = _model; - - } + private TraceLigne getLineMarkeur() { + buildLigneMarqueur(); + final TraceLigne trMarqueur = new TraceLigne(new TraceLigneModel(tLigneMarqueur_)); + if (EbliLib.isAlphaChanged(alpha_)) { + trMarqueur.setCouleur(EbliLib.getAlphaColor(tLigneMarqueur_.getCouleur(), alpha_)); + } + return trMarqueur; + } - private void buildLigneMarqueur() { - if (tLigneMarqueur_ == null) { - tLigneMarqueur_ = new TraceLigneModel(); - tLigneMarqueur_.setTypeTrait(TraceLigne.POINTILLE); - tLigneMarqueur_.setCouleur(lineModel_.getCouleur().brighter()); - } - } + private void initTraceBox() { + if (tbox_ == null) { + tbox_ = new TraceBox(); + buildLigneMarqueur(); + tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); + tbox_.setColorFond(Color.WHITE); + tbox_.setHMargin(1); + tbox_.setVMargin(1); + tbox_.setHPosition(SwingConstants.LEFT); + tbox_.setVPosition(SwingConstants.CENTER); + tbox_.setColorText(Color.BLACK); + tbox_.setDrawBox(true); + tbox_.setDrawFond(true); + } + } - private TraceLigne getLineMarkeur() { - buildLigneMarqueur(); - final TraceLigne trMarqueur = new TraceLigne(new TraceLigneModel(tLigneMarqueur_)); - if (EbliLib.isAlphaChanged(alpha_)) { - trMarqueur.setCouleur(EbliLib.getAlphaColor(tLigneMarqueur_.getCouleur(), alpha_)); - } - return trMarqueur; - } + protected void traceMarks(final Graphics2D _g, final EGRepere _t) { + final int xmin = _t.getMinEcranX(); + final int xmax = _t.getMaxEcranX(); + final int ymax = _t.getMaxEcranY(); - private void initTraceBox() { - if (tbox_ == null) { - tbox_ = new TraceBox(); - buildLigneMarqueur(); - tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); - tbox_.setColorFond(Color.WHITE); - tbox_.setHMargin(1); - tbox_.setVMargin(1); - tbox_.setHPosition(SwingConstants.LEFT); - tbox_.setVPosition(SwingConstants.CENTER); - tbox_.setColorText(Color.BLACK); - tbox_.setDrawBox(true); - tbox_.setDrawFond(true); - } - } + final Font f = EGGraphe.DEFAULT_FONT; + final Font old = _g.getFont(); + _g.setFont(f); - protected void traceMarks(final Graphics2D _g, final EGRepere _t) { - final int xmin = _t.getMinEcranX(); - final int xmax = _t.getMaxEcranX(); - final int ymax = _t.getMaxEcranY(); - - final Font f = EGGraphe.DEFAULT_FONT; - final Font old = _g.getFont(); - _g.setFont(f); + CtuluRange r = null; + TraceLigne trMarqueur = null; + if (isMarkMaxLine() || isMarkMinLine()) { + r = EGCourbeModelDefault.getLocalMinMax(_t.getXAxe(), getModel()); + } + EGAxeVertical axeY = getAxeY(); + if (r != null && isMarkMinLine() && axeY.containsPoint(r.min_)) { + trMarqueur = getLineMarkeur(); + final int yie = _t.getYEcran(r.min_, axeY); + trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); + initTraceBox(); + tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); + int x = xmin + 3; + final String str = axeY.getStringAffiche(r.min_); + if (axeY.isDroite()) { + x = xmax - 6 - _g.getFontMetrics().stringWidth(str); + } + tbox_.paintBox(_g, x, yie, str); - CtuluRange r = null; - TraceLigne trMarqueur = null; - if (isMarkMaxLine() || isMarkMinLine()) { - r = EGCourbeModelDefault.getLocalMinMax(_t.getXAxe(), getModel()); - } - EGAxeVertical axeY = getAxeY(); - if (r != null && isMarkMinLine() && axeY.containsPoint(r.min_)) { - trMarqueur = getLineMarkeur(); - final int yie = _t.getYEcran(r.min_, axeY); - trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); - initTraceBox(); - tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); - int x = xmin + 3; - final String str = axeY.getStringAffiche(r.min_); - if (axeY.isDroite()) { - x = xmax - 6 - _g.getFontMetrics().stringWidth(str); - } - tbox_.paintBox(_g, x, yie, str); + } + if (r != null && isMarkMaxLine() && axeY.containsPoint(r.max_)) { + if (trMarqueur == null) { + trMarqueur = getLineMarkeur(); + } + final int yie = _t.getYEcran(r.max_, axeY); + trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); + initTraceBox(); + tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); + int x = xmin + 3; + final String str = axeY.getStringAffiche(r.max_); + if (axeY.isDroite()) { + x = xmax - 6 - _g.getFontMetrics().stringWidth(str); + } + tbox_.paintBox(_g, x, yie, str); + } + if (getMarqueurs() != null) { + // if (trMarqueur == null) { + // trMarqueur = getLineMarkeur(); + // } + initTraceBox(); - } - if (r != null && isMarkMaxLine() && axeY.containsPoint(r.max_)) { - if (trMarqueur == null) { - trMarqueur = getLineMarkeur(); - } - final int yie = _t.getYEcran(r.max_, axeY); - trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); - initTraceBox(); - tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); - int x = xmin + 3; - final String str = axeY.getStringAffiche(r.max_); - if (axeY.isDroite()) { - x = xmax - 6 - _g.getFontMetrics().stringWidth(str); - } - tbox_.paintBox(_g, x, yie, str); - } - if (getMarqueurs() != null) { -// if (trMarqueur == null) { -// trMarqueur = getLineMarkeur(); -// } - initTraceBox(); + for (EGCourbeMarqueur marqueur : getMarqueurs()) { + tbox_.setColorBoite(marqueur.model_.getCouleur()); + // -- tracer marqueurs horitzontaux --// + if (axeY.containsPoint(marqueur.getValue()) && marqueur.isVisible() && marqueur.traceHorizontal_) { + final int yie = _t.getYEcran(marqueur.getValue(), axeY); + int x = xmin + 3; + final String str = axeY.getStringAffiche(marqueur.getValue()); + if (axeY.isDroite()) { + x = xmax - 6 - _g.getFontMetrics().stringWidth(str); + } + new TraceLigne(marqueur.model_).dessineTrait(_g, xmin, yie, xmax, yie); + tbox_.paintBox(_g, x, yie, str); + } + // -- tracer marqueurs verticaux --// + else if (getAxeX() != null && getAxeX().containsPoint(marqueur.getValue()) && marqueur.isVisible() + && !marqueur.traceHorizontal_) { + final int xie = _t.getXEcran(marqueur.getValue()); + int y = 0 + 6; + final String str = getAxeX().getStringAffiche(marqueur.getValue()); + // if (getAxeX().isDroite()) { + // x = xmax - 6 - _g.getFontMetrics().stringWidth(str); + // } + tbox_.paintBox(_g, xie, y, str); + // int widthBox=5; + // if(tbox_.currentWidth_!=-1) + // widthBox=tbox_.currentWidth_; + new TraceLigne(marqueur.model_).dessineTrait(_g, xie/* +widthBox/2 */, y, xie/* +widthBox/2 */, ymax); + } - for (EGCourbeMarqueur marqueur:getMarqueurs()) { - tbox_.setColorBoite(marqueur.model_.getCouleur()); + } + } - //-- tracer marqueurs horitzontaux --// - if (axeY.containsPoint(marqueur.getValue()) && marqueur.isVisible() && marqueur.traceHorizontal_) { - final int yie = _t.getYEcran(marqueur.getValue(), axeY); - int x = xmin + 3; - final String str = axeY.getStringAffiche(marqueur.getValue()); - if (axeY.isDroite()) { - x = xmax - 6 - _g.getFontMetrics().stringWidth(str); - } - new TraceLigne(marqueur.model_).dessineTrait(_g, xmin, yie, xmax, yie); - tbox_.paintBox(_g, x, yie, str); - } - //-- tracer marqueurs verticaux --// - else if (getAxeX()!=null && getAxeX().containsPoint(marqueur.getValue()) && marqueur.isVisible() && !marqueur.traceHorizontal_) { - final int xie = _t.getXEcran(marqueur.getValue()); - int y = 0 + 6; - final String str = getAxeX().getStringAffiche(marqueur.getValue()); -// if (getAxeX().isDroite()) { -// x = xmax - 6 - _g.getFontMetrics().stringWidth(str); -// } - tbox_.paintBox(_g, xie,y, str); -// int widthBox=5; -// if(tbox_.currentWidth_!=-1) -// widthBox=tbox_.currentWidth_; - - new TraceLigne(marqueur.model_).dessineTrait(_g, xie/*+widthBox/2*/,y , xie/*+widthBox/2*/, ymax); - - } - - - } - } + _g.setFont(old); - _g.setFont(old); + } - } + void fillWithInfo(final BPaletteInfo.InfoData _table, final CtuluListSelectionInterface _selectedPt) { + _table.setTitle(EbliLib.getS("Courbe:") + CtuluLibString.ESPACE + getTitle()); + getModel().fillWithInfo(_table, _selectedPt); + _table.put(EbliLib.getS("Nombre de points"), CtuluLibString.getString(model_.getNbValues())); + _table.put(EbliLib.getS("Nombre de points s\xE9lectionn\xE9s"), CtuluLibString.getString(_selectedPt == null ? 0 + : _selectedPt.getNbSelectedIndex())); + _table.put(EbliLib.getS("X min"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getXMin())); + _table.put(EbliLib.getS("X max"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getXMax())); + _table.put(EbliLib.getS("Y min"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getYMin())); + _table.put(EbliLib.getS("Y max"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getYMax())); - void fillWithInfo(final BPaletteInfo.InfoData _table, final CtuluListSelectionInterface _selectedPt) { - _table.setTitle(EbliLib.getS("Courbe:") + CtuluLibString.ESPACE + getTitle()); - getModel().fillWithInfo(_table, _selectedPt); - _table.put(EbliLib.getS("Nombre de points"), CtuluLibString.getString(model_.getNbValues())); - _table.put(EbliLib.getS("Nombre de points s\xE9lectionn\xE9s"), CtuluLibString.getString(_selectedPt == null ? 0 - : _selectedPt.getNbSelectedIndex())); - _table.put(EbliLib.getS("X min"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getXMin())); - _table.put(EbliLib.getS("X max"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getXMax())); - _table.put(EbliLib.getS("Y min"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getYMin())); - _table.put(EbliLib.getS("Y max"), CtuluLib.DEFAULT_NUMBER_FORMAT.format(model_.getYMax())); + } - } + final boolean isMarkMaxLine() { + return markMaxLine_; + } - final boolean isMarkMaxLine() { - return markMaxLine_; - } + final boolean isMarkMinLine() { + return markMinLine_; + } - final boolean isMarkMinLine() { - return markMinLine_; - } + boolean setLigneType(final TraceLigneModel _data) { + final boolean res = lineModel_.updateData(_data); + if (res) { + fireCourbeAspectChanged(false); + super.firePropertyChange(BSelecteurLineModel.PROPERTY, null, lineModel_); + } + return res; + } - boolean setLigneType(final TraceLigneModel _data) { - final boolean res = lineModel_.updateData(_data); - if (res) { - fireCourbeAspectChanged(false); - super.firePropertyChange(BSelecteurLineModel.PROPERTY, null, lineModel_); - } - return res; - } + final boolean setMarkMaxLine(final boolean _markMaxLine) { + if (_markMaxLine != markMaxLine_) { + markMaxLine_ = _markMaxLine; + fireCourbeAspectChanged(false); + firePropertyChange(EGCourbeConfigureTarget.PROP_MARK_MAX, markMaxLine_); + return true; + } + return false; + } - final boolean setMarkMaxLine(final boolean _markMaxLine) { - if (_markMaxLine != markMaxLine_) { - markMaxLine_ = _markMaxLine; - fireCourbeAspectChanged(false); - firePropertyChange(EGCourbeConfigureTarget.PROP_MARK_MAX, markMaxLine_); - return true; - } - return false; - } + final boolean setMarkMinLine(final boolean _markMinLine) { + if (markMinLine_ != _markMinLine) { + markMinLine_ = _markMinLine; + fireCourbeAspectChanged(false); + firePropertyChange(EGCourbeConfigureTarget.PROP_MARK_MIN, markMinLine_); + return true; + } + return false; + } - final boolean setMarkMinLine(final boolean _markMinLine) { - if (markMinLine_ != _markMinLine) { - markMinLine_ = _markMinLine; - fireCourbeAspectChanged(false); - firePropertyChange(EGCourbeConfigureTarget.PROP_MARK_MIN, markMinLine_); - return true; - } - return false; - } + protected int getAlpha() { + return alpha_; + } - protected int getAlpha() { - return alpha_; - } + protected abstract EGParent getEGParent(); - protected abstract EGParent getEGParent(); + public abstract EGCourbe duplicate(EGParent newParent, EGGrapheDuplicator _duplicator); - public abstract EGCourbe duplicate(EGParent newParent,EGGrapheDuplicator _duplicator); + protected Font getFont() { + return font_; + } - protected Font getFont() { - return font_; - } + protected boolean isDisplayTitleOnCurve() { + return displayTitleOnCurve_; + } - protected boolean isDisplayTitleOnCurve() { - return displayTitleOnCurve_; - } + protected boolean isSelected(final double _xToTest, final double _yToTest, final int _x, final int _y, + final EGRepere _t, final EGAxeVertical _yaxe, final int _precision) { + return (CtuluLibGeometrie.getDistance(_x, _y, _t.getXEcran(_xToTest), _t.getYEcran(_yToTest, _yaxe)) <= _precision); + } - protected boolean isSelected(final double _xToTest, final double _yToTest, final int _x, final int _y, - final EGRepere _t, final EGAxeVertical _yaxe, final int _precision) { - return (CtuluLibGeometrie.getDistance(_x, _y, _t.getXEcran(_xToTest), _t.getYEcran(_yToTest, _yaxe)) <= _precision); - } + protected void paintSurface(final Graphics2D _g, final EGRepere _t, final int _i) { + createSurface(); + if (surfacePainter_ != null) { + surfacePainter_.paint(_g, _t, _i); + } + } - protected void paintSurface(final Graphics2D _g, final EGRepere _t, final int _i) { - createSurface(); - if (surfacePainter_ != null) { - surfacePainter_.paint(_g, _t, _i); - } - } + protected boolean setAlpha(final int _alpha) { + if (alpha_ != _alpha) { + alpha_ = _alpha; + firePropertyChange(BSelecteurAlpha.DEFAULT_PROPERTY); + fireCourbeAspectChanged(false); + return true; + } + return false; + } - protected boolean setAlpha(final int _alpha) { - if (alpha_ != _alpha) { - alpha_ = _alpha; - firePropertyChange(BSelecteurAlpha.DEFAULT_PROPERTY); - fireCourbeAspectChanged(false); - return true; - } - return false; - } + protected boolean setDisplayTitleOnCurve(final boolean _displayTitleOnCurve) { + if (_displayTitleOnCurve == displayTitleOnCurve_) { return false; } + displayTitleOnCurve_ = _displayTitleOnCurve; + fireCourbeAspectChanged(false); + firePropertyChange(EGCourbeConfigureTarget.PROP_DISPLAY_TITLE_CURVE, displayTitleOnCurve_); + return true; + } - protected boolean setDisplayTitleOnCurve(final boolean _displayTitleOnCurve) { - if (_displayTitleOnCurve == displayTitleOnCurve_) { - return false; - } - displayTitleOnCurve_ = _displayTitleOnCurve; - fireCourbeAspectChanged(false); - firePropertyChange(EGCourbeConfigureTarget.PROP_DISPLAY_TITLE_CURVE, displayTitleOnCurve_); - return true; - } + protected boolean setFont(final Font _font) { + if (_font == font_) { return false; } + font_ = _font; + fireCourbeAspectChanged(false); + firePropertyChange(BSelecteurReduitFonteNewVersion.PROPERTY); + return true; + } - protected boolean setFont(final Font _font) { - if (_font == font_) { - return false; - } - font_ = _font; - fireCourbeAspectChanged(false); - firePropertyChange(BSelecteurReduitFonteNewVersion.PROPERTY); - return true; - } + protected void traceTitle(final Graphics2D _g, final EGRepere _t, final Envelope _r) { + if (_r == null) { return; } + final double x = _r.getMinX(); + double y = interpol(x); + final Font old = _g.getFont(); + _g.setFont(getFont()); + final FontMetrics fm = _g.getFontMetrics(); + final String title = getTitle(); + final int xie = _t.getXEcran(x); + final int xlast = xie + fm.stringWidth(title); + final double xLastReal = _t.getXReel(xlast); + final TIntArrayList l = new TIntArrayList(getModel().getNbValues()); + fillWithIdxStrictlyIncluded(Math.floor(x), Math.ceil(xLastReal), l); + for (int i = l.size() - 1; i >= 0; i--) { + final double yi = getModel().getY(l.get(i)); + if (yi > y) { + y = yi; + } + } + final int yie = _t.getYEcran(y, getAxeY()) - fm.getHeight(); + _g.drawString(title, xie, yie); + _g.setFont(old); + } - protected void traceTitle(final Graphics2D _g, final EGRepere _t, final Envelope _r) { - if (_r == null) { - return; - } - final double x = _r.getMinX(); - double y = interpol(x); - final Font old = _g.getFont(); - _g.setFont(getFont()); - final FontMetrics fm = _g.getFontMetrics(); - final String title = getTitle(); - final int xie = _t.getXEcran(x); - final int xlast = xie + fm.stringWidth(title); - final double xLastReal = _t.getXReel(xlast); - final TIntArrayList l = new TIntArrayList(getModel().getNbValues()); - fillWithIdxStrictlyIncluded(Math.floor(x), Math.ceil(xLastReal), l); - for (int i = l.size() - 1; i >= 0; i--) { - final double yi = getModel().getY(l.get(i)); - if (yi > y) { - y = yi; - } - } - final int yie = _t.getYEcran(y, getAxeY()) - fm.getHeight(); - _g.drawString(title, xie, yie); - _g.setFont(old); - } + public boolean ajuste(final CtuluRange _x, final CtuluRange _y) { + // un seul | pout ajuster les 2 + return ajusteX(_x) | ajusteY(_y); + } - public boolean ajuste(final CtuluRange _x, final CtuluRange _y) { - //un seul | pout ajuster les 2 - return ajusteX(_x) | ajusteY(_y); - } + public boolean ajusteX(final CtuluRange _r) { + double x = getXMin(); + boolean r = false; + final boolean mustChange = _r.isNill(); + if (mustChange || x < _r.min_) { + r = true; + _r.min_ = x; + } + x = getXMax(); + if (mustChange || x > _r.max_) { + r = true; + _r.max_ = x; + } + return r; + } - public boolean ajusteX(final CtuluRange _r) { - double x = getXMin(); - boolean r = false; - final boolean mustChange = _r.isNill(); - if (mustChange || x < _r.min_) { - r = true; - _r.min_ = x; - } - x = getXMax(); - if (mustChange || x > _r.max_) { - r = true; - _r.max_ = x; - } - return r; - } + public boolean ajusteY(final CtuluRange _r) { + boolean r = false; + double y = getYMin(); + final boolean mustChange = _r.isNill(); + if (mustChange || y < _r.min_) { + r = true; + _r.min_ = y; + } + y = getYMax(); + if (mustChange || y > _r.max_) { + r = true; + _r.max_ = y; + } + return r; + } - public boolean ajusteY(final CtuluRange _r) { - boolean r = false; - double y = getYMin(); - final boolean mustChange = _r.isNill(); - if (mustChange || y < _r.min_) { - r = true; - _r.min_ = y; - } - y = getYMax(); - if (mustChange || y > _r.max_) { - r = true; - _r.max_ = y; - } - return r; - } + /** + * @param _x le x a tester + * @return true si afficher + */ + public boolean containsX(final double _x) { + return (_x <= getModel().getXMax()) && (_x >= getModel().getXMin()); + } - /** - * @param _x le x a tester - * @return true si afficher - */ - public boolean containsX(final double _x) { - return (_x <= getModel().getXMax()) && (_x >= getModel().getXMin()); - } + public void createSurface() { + if (surfacePainter_ == null && getEGParent() != null) { + surfacePainter_ = new EGCourbeSurfacePainter(this, getEGParent().getMainModel()); + } + } - public void createSurface() { - if (surfacePainter_ == null && getEGParent() != null) { - surfacePainter_ = new EGCourbeSurfacePainter(this, getEGParent().getMainModel()); - } - } + public void descendre() { + getEGParent().descendre(this); + } - public void descendre() { - getEGParent().descendre(this); - } + /** + * Boolean si oui ou non le graphe est un nuage de points + */ + protected boolean nuagePoints_ = false; + /** + * Taille des points du nuages symbolis\xE9s par des carr\xE9s. + */ + protected int largeurPointsNuage_ = 5; - /** - * Boolean si oui ou non le graphe est un nuage de points - */ - protected boolean nuagePoints_=false; - /** - * Taille des points du nuages symbolis\xE9s par des carr\xE9s. - */ - protected int largeurPointsNuage_=5; + public void dessine(final Graphics2D _g, final EGRepere _t) { + if (!isVisible_) { return; } + if (model_.getNbValues() == 0) { return; } - public void dessine(final Graphics2D _g, final EGRepere _t) { - if (!isVisible_) { - return; - } - if (model_.getNbValues() == 0) { - return; - } - - - - final Shape oldClip = _g.getClip(); - final int minX = _t.getMinEcranX(); - final int adjust = 3; - _g.setClip(minX - adjust, 0, _t.getMaxEcranX() - minX + adjust * 2, _t.getH()); - final int nbPt = model_.getNbValues(); - double xi, yi, xie, yie; - boolean xiVisible; - boolean yiVisible; - double xpe = 0; - double ype = 0; - double ypeVal=0; - boolean xpVisible = false; - Envelope rangeDisplayed = null; - _g.setColor(EbliLib.getAlphaColor(getAspectContour(), alpha_)); - final boolean isAlphaChanged = EbliLib.isAlphaChanged(alpha_); - final TraceIcon trIcon = new TraceIcon(isAlphaChanged ? new TraceIconModel(iconeModel_) : iconeModel_); - final TraceLigne trLigne = new TraceLigne(isAlphaChanged ? new TraceLigneModel(lineModel_) : lineModel_); - if (isAlphaChanged) { - trIcon.setCouleur(EbliLib.getAlphaColor(trIcon.getCouleur(), alpha_)); - trLigne.setCouleur(EbliLib.getAlphaColor(trLigne.getCouleur(), alpha_)); - } - for (int i = 0; i < nbPt; i++) { - xi = model_.getX(i); - yi = model_.getY(i); - xie = _t.getXEcran(xi); - yie = _t.getYEcran(yi, getAxeY()); - xiVisible = _t.getXAxe().containsPoint(xi); - yiVisible = getAxeY().containsPoint(yi); + final Shape oldClip = _g.getClip(); + final int minX = _t.getMinEcranX(); + final int adjust = 3; + _g.setClip(minX - adjust, 0, _t.getMaxEcranX() - minX + adjust * 2, _t.getH()); + final int nbPt = model_.getNbValues(); + double xi, yi, xie, yie; + boolean xiVisible; + boolean yiVisible; + double xpe = 0; + double ype = 0; + double ypeVal = 0; + boolean xpVisible = false; + Envelope rangeDisplayed = null; + _g.setColor(EbliLib.getAlphaColor(getAspectContour(), alpha_)); + final boolean isAlphaChanged = EbliLib.isAlphaChanged(alpha_); + final TraceIcon trIcon = new TraceIcon(isAlphaChanged ? new TraceIconModel(iconeModel_) : iconeModel_); + final TraceLigne trLigne = new TraceLigne(isAlphaChanged ? new TraceLigneModel(lineModel_) : lineModel_); + if (isAlphaChanged) { + trIcon.setCouleur(EbliLib.getAlphaColor(trIcon.getCouleur(), alpha_)); + trLigne.setCouleur(EbliLib.getAlphaColor(trLigne.getCouleur(), alpha_)); + } + for (int i = 0; i < nbPt; i++) { + xi = model_.getX(i); + yi = model_.getY(i); + xie = _t.getXEcran(xi); + yie = _t.getYEcran(yi, getAxeY()); + xiVisible = _t.getXAxe().containsPoint(xi); + yiVisible = getAxeY().containsPoint(yi); - if (model_.isPointDrawn(i) && xiVisible && yiVisible && iconeModel_.getType() != TraceIcon.RIEN) { - if (displayTitleOnCurve_) { - if (rang... [truncated message content] |
From: <de...@us...> - 2009-09-29 21:06:50
|
Revision: 5131 http://fudaa.svn.sourceforge.net/fudaa/?rev=5131&view=rev Author: deniger Date: 2009-09-29 21:06:34 +0000 (Tue, 29 Sep 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimation.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAvi.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAviMencoder.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputFlash.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputImage.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationVideoEditPanel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCarte.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCartouche.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueGrilleReguliere.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueImagePersistence.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendeCustomizer.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendePanel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceSingle.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueRepereInteraction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueSelectionInteraction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueTailleInteraction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGISTreeModel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGuiHelper.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliAdapteurSuiviSouris.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliFilleCalques.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonnees.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMulti.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMultiSpecial.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFleche.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheGrilleSection.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheScaleSection.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGeometry.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueMultiPoint.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalquePoint.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalquePolygone.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalquePolyligne.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSegment.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModelPointAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModeleFlecheForGrille.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModeleGeometry.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModeleImageRaster.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModeleLigneBrisee.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModeleMultiPoint.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZModeleStatiqueMaillageElement.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZScene.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZSelectionTableUpdater.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZSelectionTrace.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/CalqueActionTable.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/CalqueSelectionAction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/EbliCalqueActionVariableChooser.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/SceneDeplacementAction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/SceneRotationAction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/SceneSplitAction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/dessin/DeMultiPoint.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/find/CalqueFindActionAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/find/CalqueFindActionDefault.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/find/CalqueFindComponentPolygone.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/find/CalqueFindCourbeTreeModel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/find/CalqueFindExpression.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/find/CalqueFindFlecheExpression.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/find/CalqueFindPointExpression.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/commun/BJava3DVersionTest.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/commun/EbliActionMap.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/commun/EbliActionPaletteAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/commun/EbliLib.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/commun/EbliListeSelectionMultiInterface.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BConfigurePaletteAction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BConfigureSectionBuilder.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BMolette.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurColorChooserBt.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurComposite.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurFont.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurLineModel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurList.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurListComboBox.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurTargetComposite.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BSelecteurTextField.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/dialog/BDialogContent.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/dialog/BInternalDialog.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/find/EbliFindActionAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/find/EbliFindComponentExpr.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/find/EbliFindExpressionComposite.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/find/EbliFindExpressionContainerInterface.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/find/EbliFindExpressionDefault.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/geometrie/GrBoite.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/geometrie/GrMaillageElement.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/geometrie/GrPolygone.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/geometrie/VecteurGrPoint.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/graphe/BGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/graphe/BGrapheComponentTableModel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/graphe/BGrapheController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/graphe/BGrapheEditeurAxes.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/graphe/BGraphePersonnaliseur.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/graphe/Graphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/impression/EbliFillePrevisualisation.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/impression/EbliMiseEnPageDialog.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/impression/EbliMiseEnPagePanel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/impression/EbliPrinter.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/palette/BPalettePlageAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/repere/BControleNavigation.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/repere/ZTransformationDomaine.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/tableau/EbliFilleTableau.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/trace/TraceGeometrie.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/trace/TraceLigne.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/trace/TraceSurface.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliEditorArrow.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliNode.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliNodeDefault.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerFlecheEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerForGroup.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerMenuOnly.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerTextEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithView.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/ProportionnalResizeBorder.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoCreation.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeDuplicate.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionAlign.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionColorBackground.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionColorForeground.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionConfigure.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionFont.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionGroup.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionImageChooser.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRetaillageHorizontal.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRetaillageVertical.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/animation/EbliWidgetAnimAdapter.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliAlignWithMoveStrategyProvider.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetCursorProvider.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/calque/ZCalqueSondeSynchroniserFusion.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreator.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorArrowEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorConnectionWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorDblFleche.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFleche.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorImage.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorShape.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextEditor.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorTextLabel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetGroupCreator.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/persist/ManagerWidgetPersist.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliJXTreeTableCellRenderer.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BCalqueBoite.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BChampVecteurs.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BGrille.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BGrilleReguliere.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BGroupeLumiere.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BGroupeStandard.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BNuagePoints.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/BTriangles.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/EbliFilleVue3D.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/VolumePreferencesPanel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/ZVue3DController.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/ZVue3DPanel.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/ZVueAnimAdapter.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleAffichage.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleTexture.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleVolume.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BMagnetoscope.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BSelecteurTexture.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/ZControleLumiere.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/calque/example/TestZCalqueImage.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/calque/example/TestZCalquePoint.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/courbe/TestJGr.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/courbe/example/TestEGGraphe.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/example/Serial.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/example/TestLayout.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/geometrie/TestJVecteurGenerique.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/graphe/example/TestBGraphe.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/graphe/example/TestGraphe.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/visuallibrary/example/TestVisualLibrary.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/visuallibrary/example/TestWidgetHtml.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/volume/CartoucheExample.java trunk/fudaa_devel/ebli/test/org/fudaa/ebli/volume/FrameVolumeExample.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostBuilderSuiteCalcul.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostScene.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionAddPointFromWidgetCalque.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionAddPointFromWidgetCalque2.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChangeSceneForWidget.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChooseAndCreateCalque.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionDuplicate.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionCalques.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionGraphes.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliHelioCentiqueWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliSatteliteWidget.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerConteneurFleche.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/PredicateFactory.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/WidgetResource.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandChangeVisibility.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandCompositeScene.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSelect.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionChangeVisility.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDelete.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionFilteredAbstract.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionMoveToBack.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionMoveToFirst.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionUngroup.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/widget_en.fr_txt Removed Paths: ------------- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerActionOnly.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandMasquer.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeBringToBack.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBackGround.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDeleteSelected.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionSimple.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java trunk/fudaa_devel/ebli/src/org/fudaa/ebli/visuallibrary/behavior/MoveAction.java Deleted: trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java =================================================================== --- trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluEventTrigger.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -1,29 +0,0 @@ -package org.fudaa.ctulu; - -/** - * Interface qui gere des evenements a executer ulterieurement en utilisant les methodes de declenchement. - * @author Adrien Hadoux - * - */ -public interface CtuluEventTrigger { - - public final static int TRIGGER_DESTROY=1; - public final static int TRIGGER_DUPLICATE=2; - public final static int TRIGGER_REFRESH=3; - - - /** - * Declenche une suppression a la toute fin. - */ - public void triggerDestroy(); - /** - * Declenche une duplication a la toute fin. - */ - public void triggerDuplicate(); - /** - * Declenche un refresh a la toute fin. - */ - public void triggerRefresh(); - - -} Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimation.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimation.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimation.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -12,6 +12,7 @@ import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Font; +import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ComponentEvent; @@ -39,10 +40,8 @@ import org.fudaa.ctulu.gui.CtuluRoundEtchBorder; import org.fudaa.ctulu.gui.CtuluTitledPanelCheckBox; import org.fudaa.ctulu.image.CtuluImageDimensionChooserPanel; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.ressource.EbliResource; -import java.awt.Window; /** * @author Fred Deniger Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -16,7 +16,6 @@ import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.ctulu.gui.CtuluLibDialog; - import org.fudaa.ebli.commun.EbliLib; /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAvi.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAvi.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAvi.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -13,13 +13,12 @@ import com.memoire.fu.FuLog; +import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluLibMessage; import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.gui.CtuluLibDialog; import org.fudaa.ctulu.image.CtuluImageProducer; -import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.video.CtuluAviWriter; - import org.fudaa.ebli.commun.EbliLib; /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAviMencoder.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAviMencoder.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputAviMencoder.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -26,7 +26,6 @@ import org.fudaa.ctulu.image.CtuluImageExport; import org.fudaa.ctulu.image.CtuluImageProducer; import org.fudaa.ctulu.video.CtuluMencoderFinder; - import org.fudaa.ebli.commun.EbliLib; /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputFlash.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputFlash.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputFlash.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -9,15 +9,7 @@ import java.awt.Component; import java.awt.image.BufferedImage; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; +import java.io.*; import javax.swing.BorderFactory; import javax.swing.JCheckBox; @@ -31,23 +23,15 @@ import com.anotherbigidea.flash.movie.Shape; import com.anotherbigidea.flash.movie.Image.Lossless; import com.anotherbigidea.flash.structs.Color; - -import com.memoire.bu.BuBorderLayout; -import com.memoire.bu.BuBrowserControl; -import com.memoire.bu.BuCheckBox; -import com.memoire.bu.BuPanel; -import com.memoire.bu.BuScrollPane; -import com.memoire.bu.BuTextArea; -import com.memoire.bu.BuVerticalLayout; +import com.memoire.bu.*; import com.memoire.fu.FuLib; import com.memoire.fu.FuLog; import org.fudaa.ctulu.CtuluLibFile; +import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluLibMessage; import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.ctulu.image.CtuluImageProducer; -import org.fudaa.ctulu.CtuluLibImage; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.ressource.EbliResource; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputGIF.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -15,10 +15,9 @@ import com.memoire.fu.FuLog; +import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.gif.CtuluGif89EncoderImmediateSave; import org.fudaa.ctulu.image.CtuluImageProducer; -import org.fudaa.ctulu.CtuluLibImage; - import org.fudaa.ebli.commun.EbliLib; /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputImage.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputImage.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationOutputImage.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -25,13 +25,12 @@ import org.fudaa.ctulu.CtuluHtmlWriter; import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibFile; +import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.ctulu.gui.CtuluLibDialog; import org.fudaa.ctulu.image.CtuluImageExport; import org.fudaa.ctulu.image.CtuluImageProducer; -import org.fudaa.ctulu.CtuluLibImage; - import org.fudaa.ebli.commun.EbliLib; /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationVideoEditPanel.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationVideoEditPanel.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/animation/EbliAnimationVideoEditPanel.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -21,17 +21,10 @@ import com.memoire.bu.BuValueValidator; import com.memoire.fu.FuLib; -import org.fudaa.ctulu.CtuluHtmlWriter; -import org.fudaa.ctulu.CtuluLib; -import org.fudaa.ctulu.CtuluLibFile; -import org.fudaa.ctulu.CtuluLibString; -import org.fudaa.ctulu.CtuluResource; -import org.fudaa.ctulu.CtuluValueValidator; +import org.fudaa.ctulu.*; import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.ctulu.gui.CtuluLibDialog; -import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.video.CtuluMencoderFinder; - import org.fudaa.ebli.commun.EbliLib; /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -13,13 +13,7 @@ import java.awt.Font; import java.awt.Insets; import java.awt.Rectangle; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.awt.event.MouseEvent; +import java.awt.event.*; import java.util.EventObject; import java.util.Observable; import java.util.Observer; @@ -33,22 +27,13 @@ import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; -import com.memoire.bu.BuBorderLayout; -import com.memoire.bu.BuBorders; -import com.memoire.bu.BuCheckBox3States; -import com.memoire.bu.BuDynamicMenu; -import com.memoire.bu.BuLib; -import com.memoire.bu.BuLightBorder; -import com.memoire.bu.BuMenu; -import com.memoire.bu.BuTextField; -import com.memoire.bu.BuVerticalLayout; +import com.memoire.bu.*; import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ctulu.gui.CtuluPopupMenu; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.commun.EbliPopupListener; import org.fudaa.ebli.ressource.EbliResource; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -42,7 +42,6 @@ import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ctulu.gui.CtuluPopupMenu; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.ressource.EbliResource; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalque.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalque.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -8,14 +8,7 @@ */ package org.fudaa.ebli.calque; -import java.awt.Color; -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Rectangle; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; @@ -39,19 +32,12 @@ import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.gui.CtuluDialogPanel; - import org.fudaa.ebli.commun.CalqueLayout; import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliComponentFactory; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.commun.EbliUIProperties; -import org.fudaa.ebli.controle.BConfigurableInterface; -import org.fudaa.ebli.controle.BConfigurePaletteTargetInterface; -import org.fudaa.ebli.controle.BSelecteurCheckBox; -import org.fudaa.ebli.controle.BSelecteurColorChooser; -import org.fudaa.ebli.controle.BSelecteurReduitFonteNewVersion; -import org.fudaa.ebli.controle.BSelecteurTargetInterface; -import org.fudaa.ebli.controle.BSelecteurTextField; +import org.fudaa.ebli.controle.*; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrMorphisme; import org.fudaa.ebli.geometrie.GrPoint; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCarte.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCarte.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCarte.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -12,14 +12,7 @@ // import org.fudaa.dodico.corba.geometrie.*; // import org.fudaa.dodico.corba.mesure.*; // import org.fudaa.dodico.corba.representation.*; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Polygon; -import java.awt.PrintGraphics; -import java.awt.Rectangle; +import java.awt.*; import java.awt.geom.Rectangle2D; import java.text.NumberFormat; import java.util.Locale; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCartouche.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCartouche.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueCartouche.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -8,13 +8,7 @@ */ package org.fudaa.ebli.calque; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Insets; +import java.awt.*; import java.awt.image.FilteredImageSource; import javax.swing.Icon; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueGrilleReguliere.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueGrilleReguliere.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueGrilleReguliere.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -8,13 +8,7 @@ */ package org.fudaa.ebli.calque; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Polygon; +import java.awt.*; import java.awt.geom.Rectangle2D; import java.text.NumberFormat; import java.util.Locale; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueImagePersistence.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueImagePersistence.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueImagePersistence.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -13,21 +13,12 @@ import java.util.ArrayList; import java.util.List; +import com.memoire.fu.FuLog; + +import org.fudaa.ctulu.*; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import com.memoire.fu.FuLog; - -import org.fudaa.ctulu.CtuluArkLoader; -import org.fudaa.ctulu.CtuluArkSaver; -import org.fudaa.ctulu.CtuluLib; -import org.fudaa.ctulu.CtuluLibFile; -import org.fudaa.ctulu.CtuluLibString; -import org.fudaa.ctulu.CtuluXmlReaderHelper; -import org.fudaa.ctulu.CtuluXmlWriter; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ctulu.CtuluImageContainer; - /** * @author fred deniger * @version $Id: BCalqueImagePersistence.java,v 1.10 2007/05/04 13:49:42 deniger Exp $ Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -7,13 +7,7 @@ */ package org.fudaa.ebli.calque; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; +import java.awt.*; import java.awt.event.ContainerListener; import java.util.HashMap; import java.util.Hashtable; @@ -26,6 +20,9 @@ import javax.swing.JPanel; import javax.swing.SwingConstants; +import com.memoire.bu.BuGridLayout; +import com.memoire.bu.BuPanel; + import org.fudaa.ctulu.gui.CtuluHorizontalLayout; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.commun.EbliPreferences; @@ -34,9 +31,6 @@ import org.fudaa.ebli.controle.BSelecteurTargetInterface; import org.fudaa.ebli.palette.BPaletteCouleurSimple; -import com.memoire.bu.BuGridLayout; -import com.memoire.bu.BuPanel; - /** * Un calque d'affichage de legendes. * Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendeCustomizer.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendeCustomizer.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendeCustomizer.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -8,14 +8,7 @@ package org.fudaa.ebli.calque; import java.awt.Color; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ContainerEvent; -import java.awt.event.ContainerListener; -import java.awt.event.HierarchyEvent; -import java.awt.event.HierarchyListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; +import java.awt.event.*; import javax.swing.*; import javax.swing.event.ChangeEvent; @@ -30,7 +23,6 @@ import org.fudaa.ctulu.gui.CtuluCellBooleanEditor; import org.fudaa.ctulu.gui.CtuluCellBooleanRenderer; import org.fudaa.ctulu.gui.CtuluLibSwing; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BSelecteurAncre; import org.fudaa.ebli.controle.BSelecteurReduitFonteNewVersion; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendePanel.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendePanel.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegendePanel.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -16,12 +16,12 @@ import javax.swing.JLabel; import javax.swing.SwingConstants; -import org.fudaa.ebli.commun.EbliPreferences; - import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuLib; import com.memoire.bu.BuPanel; +import org.fudaa.ebli.commun.EbliPreferences; + /** * @author Fred Deniger * @version $Id: BCalqueLegendePanel.java,v 1.14 2007-06-28 09:26:47 deniger Exp $ Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceSingle.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceSingle.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceSingle.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -22,7 +22,6 @@ import org.fudaa.ctulu.CtuluXmlReaderHelper; import org.fudaa.ctulu.CtuluXmlWriter; import org.fudaa.ctulu.ProgressionInterface; - import org.fudaa.ebli.commun.EbliUIProperties; /** Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueRepereInteraction.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueRepereInteraction.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueRepereInteraction.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -18,7 +18,6 @@ import java.awt.event.MouseMotionListener; import java.util.ArrayList; import java.util.List; -import java.util.Vector; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrPoint; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueSelectionInteraction.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueSelectionInteraction.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueSelectionInteraction.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -8,13 +8,7 @@ */ package org.fudaa.ebli.calque; -import java.awt.Color; -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.Point; -import java.awt.Polygon; +import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueTailleInteraction.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueTailleInteraction.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueTailleInteraction.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -14,13 +14,7 @@ import com.memoire.fu.FuLog; -import org.fudaa.ebli.geometrie.GrBoite; -import org.fudaa.ebli.geometrie.GrContour; -import org.fudaa.ebli.geometrie.GrMorphisme; -import org.fudaa.ebli.geometrie.GrObjet; -import org.fudaa.ebli.geometrie.GrPoint; -import org.fudaa.ebli.geometrie.GrPolygone; -import org.fudaa.ebli.geometrie.VecteurGrContour; +import org.fudaa.ebli.geometrie.*; /** * Un calque de redimensionnement d'objets s\xE9lectionnes en coordonnees * reelles. Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -18,16 +18,16 @@ import java.util.HashMap; import java.util.List; +import com.memoire.fu.FuLog; + +import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluLibString; -import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BConfigurableInterface; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrMorphisme; import org.fudaa.ebli.palette.BPaletteInfo.InfoData; -import com.memoire.fu.FuLog; - /** * Un groupe de calques. Cette classe joue un role structurant. C'est un noeud dans la hierarchie arborescente des * calques. Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BVueCalque.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -7,15 +7,7 @@ */ package org.fudaa.ebli.calque; -import java.awt.BorderLayout; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.Insets; -import java.awt.PrintGraphics; -import java.awt.Rectangle; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; @@ -36,7 +28,6 @@ import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibImage; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrMorphisme; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGISTreeModel.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGISTreeModel.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGISTreeModel.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -28,23 +28,17 @@ import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; +import com.vividsolutions.jts.geom.Geometry; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibArray; +import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluLibString; -import org.fudaa.ctulu.gis.GISAttributeConstants; -import org.fudaa.ctulu.gis.GISAttributeModelObjectInterface; -import org.fudaa.ctulu.gis.GISGeometry; -import org.fudaa.ctulu.gis.GISLib; -import org.fudaa.ctulu.gis.GISVisitorChooser; -import org.fudaa.ctulu.gis.GISVisitorGeometryCollector; -import org.fudaa.ctulu.gis.GISZoneCollection; +import org.fudaa.ctulu.gis.*; import org.fudaa.ctulu.gui.CtuluCellRenderer; -import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.ressource.EbliResource; -import com.vividsolutions.jts.geom.Geometry; - /** * Un TreeModel repr\xE9sentant les calques contenant des g\xE9om\xE9tries. Ces g\xE9om\xE9tries peuvent \xEAtre filtr\xE9es par type. * Ce mod\xE8le est automatiquement mis a jour si une instance de l'arbre des calque lui est fourni. Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGuiHelper.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGuiHelper.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/CalqueGuiHelper.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -20,13 +20,7 @@ import com.memoire.bu.BuPopupButton; import com.memoire.bu.BuResource; -import org.fudaa.ebli.controle.BSelecteurAncre; -import org.fudaa.ebli.controle.BSelecteurCouleur; -import org.fudaa.ebli.controle.BSelecteurPlanCouleur; -import org.fudaa.ebli.controle.BSelecteurReduitFonteNewVersion; -import org.fudaa.ebli.controle.BSelecteurReduitParametresGouraud; -import org.fudaa.ebli.controle.BSelecteurResolution; -import org.fudaa.ebli.controle.BSelecteurTargetInterface; +import org.fudaa.ebli.controle.*; import org.fudaa.ebli.palette.BPaletteForme; import org.fudaa.ebli.palette.BPaletteProprietesSurface; import org.fudaa.ebli.palette.BPaletteSelecteurReduitCouleur; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliAdapteurSuiviSouris.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliAdapteurSuiviSouris.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliAdapteurSuiviSouris.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -11,7 +11,6 @@ import javax.swing.JLabel; import org.fudaa.ctulu.CtuluLibString; - import org.fudaa.ebli.commun.EbliFormatterInterface; import org.fudaa.ebli.repere.CoordonneesEvent; import org.fudaa.ebli.repere.CoordonneesListener; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliFilleCalques.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliFilleCalques.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliFilleCalques.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -8,15 +8,7 @@ */ package org.fudaa.ebli.calque; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Insets; -import java.awt.Rectangle; -import java.awt.Shape; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.print.PageFormat; @@ -28,14 +20,7 @@ import java.util.Hashtable; import java.util.Set; -import javax.swing.AbstractButton; -import javax.swing.JColorChooser; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.JToggleButton; +import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; import javax.swing.event.TreeSelectionEvent; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonnees.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonnees.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonnees.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -11,7 +11,6 @@ import org.fudaa.ctulu.CtuluListSelection; import org.fudaa.ctulu.CtuluListSelectionInterface; - import org.fudaa.ebli.calque.find.CalqueFindActionDefault; import org.fudaa.ebli.calque.find.CalqueFindExpression; import org.fudaa.ebli.commun.EbliSelectionState; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -16,7 +16,6 @@ import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluRange; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.commun.EbliListeSelectionMultiInterface; import org.fudaa.ebli.commun.EbliTableInfoPanel; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -15,7 +15,6 @@ import com.vividsolutions.jts.geom.LinearRing; import org.fudaa.ctulu.CtuluListSelectionInterface; - import org.fudaa.ebli.commun.EbliListeSelectionMultiInterface; import org.fudaa.ebli.commun.EbliTableInfoTarget; import org.fudaa.ebli.find.EbliFindableItem; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMulti.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMulti.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMulti.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -9,7 +9,6 @@ import com.vividsolutions.jts.geom.LinearRing; import org.fudaa.ctulu.CtuluListSelection; - import org.fudaa.ebli.commun.EbliListeSelectionMulti; import org.fudaa.ebli.commun.EbliListeSelectionMultiInterface; import org.fudaa.ebli.commun.EbliSelectionState; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMultiSpecial.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMultiSpecial.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMultiSpecial.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -10,7 +10,6 @@ import org.fudaa.ctulu.CtuluListSelection; import org.fudaa.ctulu.CtuluListSelectionInterface; - import org.fudaa.ebli.commun.EbliListeSelectionMulti; import org.fudaa.ebli.commun.EbliSelectionState; import org.fudaa.ebli.geometrie.GrPoint; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFleche.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFleche.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFleche.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -16,14 +16,13 @@ import javax.swing.table.AbstractTableModel; +import com.memoire.fu.FuLog; import com.vividsolutions.jts.algorithm.SIRtreePointInRing; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.LineString; import com.vividsolutions.jts.geom.LinearRing; -import com.memoire.fu.FuLog; - import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibString; @@ -33,7 +32,6 @@ import org.fudaa.ctulu.gis.CtuluLibGeometrie; import org.fudaa.ctulu.gis.GISGeometryFactory; import org.fudaa.ctulu.gis.GISLib; - import org.fudaa.ebli.calque.find.CalqueFindActionDefault; import org.fudaa.ebli.calque.find.CalqueFindFlecheExpression; import org.fudaa.ebli.commun.EbliLib; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheGrilleSection.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheGrilleSection.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheGrilleSection.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -18,7 +18,6 @@ import com.memoire.bu.BuHorizontalLayout; import com.memoire.bu.BuLabel; import com.memoire.bu.BuPanel; -import com.memoire.bu.BuResource; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BSelecteurAbstract; Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheScaleSection.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheScaleSection.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueFlecheScaleSection.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -23,15 +23,8 @@ import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibString; - import org.fudaa.ebli.commun.EbliLib; -import org.fudaa.ebli.controle.BSelecteurButton; -import org.fudaa.ebli.controle.BSelecteurCheckBox; -import org.fudaa.ebli.controle.BSelecteurComposite; -import org.fudaa.ebli.controle.BSelecteurFont; -import org.fudaa.ebli.controle.BSelecteurInterface; -import org.fudaa.ebli.controle.BSelecteurSpinner; -import org.fudaa.ebli.controle.BSelecteurTextField; +import org.fudaa.ebli.controle.*; /** * @author fred deniger Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGeometry.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGeometry.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGeometry.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -14,10 +14,7 @@ import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; -import java.awt.Polygon; -import org.nfunk.jep.Variable; - import com.memoire.fu.FuLog; import com.vividsolutions.jts.algorithm.SIRtreePointInRing; import com.vividsolutions.jts.geom.Coordinate; @@ -37,7 +34,6 @@ import org.fudaa.ctulu.gis.GISGeometryFactory; import org.fudaa.ctulu.gis.GISLib; import org.fudaa.ctulu.gis.GISZoneCollection; - import org.fudaa.ebli.calque.find.CalqueFindExpression; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.commun.EbliListeSelectionMulti; @@ -45,7 +41,6 @@ import org.fudaa.ebli.commun.EbliSelectionMode; import org.fudaa.ebli.commun.EbliSelectionState; import org.fudaa.ebli.commun.EbliUIProperties; -import org.fudaa.ebli.controle.BSelecteurLineModel; import org.fudaa.ebli.find.EbliFindExpressionContainerInterface; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrMorphisme; @@ -56,6 +51,7 @@ import org.fudaa.ebli.trace.TraceLigneModel; import org.fudaa.ebli.trace.TraceSurface; import org.fudaa.ebli.trace.TraceSurfaceModel; +import org.nfunk.jep.Variable; /** * Un calque g\xE9rant des g\xE9om\xE9tries quelconques, \xE0 un niveau global ou atomique.<p> Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -11,16 +11,13 @@ import gnu.trove.TDoubleArrayList; import gnu.trove.TIntArrayList; -import java.awt.Color; -import java.awt.Component; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Insets; +import java.awt.*; import java.util.ArrayList; import java.util.List; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.LinearRing; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluListSelection; @@ -34,9 +31,6 @@ import org.fudaa.ebli.trace.TraceLigne; import org.fudaa.ebli.trace.TraceLigneModel; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.LinearRing; - /** * Un calque d'affichage d'une grille. * Modified: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java 2009-09-23 20:31:13 UTC (rev 5130) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java 2009-09-29 21:06:34 UTC (rev 5131) @@ -15,8 +15,6 @@ import java.awt.Graphics; import java.awt.Graphics2D; -import org.nfunk.jep.Variable; - import com.memoire.fu.FuLog; import com.vividsolutions.jts.algorithm.SIRtreePointInRing; import com.vividsolutions.jts.geom.Coordinate; @@ -34,7 +32,6 @@ import org.fudaa.ctulu.gis.GISGeometryFactory; import org.fudaa.ctulu.gis.GISLib; import org.fudaa.ctulu.gis.GISZoneCollection; - import org.fudaa.ebli.calque.edition.ZModeleEditable; import org.fudaa.ebli.calque.find.CalqueFindExpression; import org.fudaa.ebli.commun.EbliLib; @@ -53... [truncated message content] |
From: <de...@us...> - 2009-10-06 21:31:28
|
Revision: 5180 http://fudaa.svn.sourceforge.net/fudaa/?rev=5180&view=rev Author: deniger Date: 2009-10-06 21:31:20 +0000 (Tue, 06 Oct 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportAdaptI.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSourceFilterActivity.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6Activity.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6T3Activity.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportTaskSkeleton.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportToT3Activity.java Added Paths: ----------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/AbstractEfGridDataDecorator.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataRenumeroteDecorator.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataT64T3Decorator.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataToT6Decorator.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTranslateDecorator.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/AbstractEfOperation.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperation.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperationResult.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT3.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT6.java Removed Paths: ------------- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExport4T3.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecorator.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorTranslation.java Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/AbstractEfGridDataDecorator.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/AbstractEfGridDataDecorator.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/AbstractEfGridDataDecorator.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,63 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.decorator; + +import java.io.IOException; + +import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; + +/** + * Une classe qui permet d'encapsuler les r\xE9sultats d'une op\xE9ration sur un maillage dans un conteneur EfGridData. Il est + * suppos\xE9 que les types des valeurs ( valeurs aux noeuds ou aux \xE9l\xE9ments) ne sont pas modifi\xE9es par l'op\xE9rations + * + * @author deniger + */ +public abstract class AbstractEfGridDataDecorator implements EfGridData { + + private final EfGridData init; + private final EfGridInterface newGrid; + + /** + * @param init les donn\xE9es initiales avant l'op\xE9ration sur le maillage + * @param newGrid le nouveau maillage + */ + public AbstractEfGridDataDecorator(EfGridData init, EfGridInterface newGrid) { + super(); + this.init = init; + this.newGrid = newGrid; + } + + /** + * + */ + public double getData(CtuluVariable o, int timeIdx, int idxObjet) throws IOException { + return getData(o, timeIdx).getValue(idxObjet); + } + + /** + * @return le nouveau maillage obtenue par l'op\xE9ration + */ + public EfGridInterface getGrid() { + return newGrid; + } + + /** + * @return the init le gridData initial + */ + protected EfGridData getInit() { + return init; + } + + public boolean isDefined(CtuluVariable var) { + return init.isDefined(var); + } + + public boolean isElementVar(CtuluVariable idxVar) { + return init.isElementVar(idxVar); + } + +} Copied: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataRenumeroteDecorator.java (from rev 4924, trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecorator.java) =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataRenumeroteDecorator.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataRenumeroteDecorator.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,90 @@ +/* + * @creation 13 mai 2005 + * @modification $Date: 2007-06-11 13:08:15 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.dodico.ef.decorator; + +import gnu.trove.TIntIntHashMap; + +import java.io.IOException; + +import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.dodico.ef.EfData; +import org.fudaa.dodico.ef.EfDataElement; +import org.fudaa.dodico.ef.EfDataNode; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; + +/** + * Un decorateur pour les griddata dont la num\xE9rotation des noeuds/\xE9l\xE9ments a \xE9t\xE9 modifier. Il y a une map qui donne la + * correspondance entre l'indice des nouveaux \xE9l\xE9ments/anciens \xE9l\xE9ments et une map pour les noeuds. + * + * @author Fred Deniger + * @version $Id: MvExportDecorator.java,v 1.6 2007-06-11 13:08:15 deniger Exp $ + */ +public class EfGridDataRenumeroteDecorator extends AbstractEfGridDataDecorator { + + private TIntIntHashMap eltNewIdxOldIdx_; + private TIntIntHashMap ptNewIdxOldIdx_; + + public EfGridDataRenumeroteDecorator(final EfGridData _src, EfGridInterface newGrid) { + super(_src, newGrid); + } + + public EfGridInterface getGrid() { + return getNewGrid(); + } + + public EfData getData(final CtuluVariable _t, final int _idxTime) throws IOException { + final EfData init = getInit().getData(_t, _idxTime); + if (init == null) { return null; } + final boolean isEle = init.isElementData(); + if (isEle && getEltNewIdxOldIdxMap() == null) { return init; } + if (!isEle && getPtNewIdxOldIdxMap() == null) { return init; } + // le type de la valeur initiale est conserv\xE9e + final double[] newValues = new double[isEle ? getNewGrid().getEltNb() : getNewGrid().getPtsNb()]; + for (int i = newValues.length - 1; i >= 0; i--) { + final int oldEltIdx = isEle ? getEltNewIdxOldIdxMap().get(i) : getPtNewIdxOldIdxMap().get(i); + newValues[i] = init.getValue(oldEltIdx); + } + return isEle ? (EfData) new EfDataElement(newValues) : (EfData) new EfDataNode(newValues); + } + + /** + * @param eltNewIdxOldIdx_ the eltNewIdxOldIdx_ to set + */ + public void setEltNewIdxOldIdxMap(TIntIntHashMap eltNewIdxOldIdx_) { + this.eltNewIdxOldIdx_ = eltNewIdxOldIdx_; + } + + /** + * @return the eltNewIdxOldIdx_ + */ + public TIntIntHashMap getEltNewIdxOldIdxMap() { + return eltNewIdxOldIdx_; + } + + /** + * @param ptNewIdxOldIdx_ the ptNewIdxOldIdx_ to set + */ + public void setPtNewIdxOldIdxMap(TIntIntHashMap ptNewIdxOldIdx_) { + this.ptNewIdxOldIdx_ = ptNewIdxOldIdx_; + } + + /** + * @return the ptNewIdxOldIdx_ + */ + public TIntIntHashMap getPtNewIdxOldIdxMap() { + return ptNewIdxOldIdx_; + } + + /** + * @return the newGrid_ + */ + public EfGridInterface getNewGrid() { + return super.getGrid(); + } +} \ No newline at end of file Copied: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataT64T3Decorator.java (from rev 4966, trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExport4T3.java) =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataT64T3Decorator.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataT64T3Decorator.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,54 @@ +/* + * @creation 17 mai 2005 + * @modification $Date: 2007-06-11 13:08:15 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.dodico.ef.decorator; + +import java.io.IOException; + +import com.memoire.fu.FuLog; + +import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.dodico.ef.EfData; +import org.fudaa.dodico.ef.EfDataElement; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; + +/** + * Decoration pour les op\xE9rations qui transforme les T6 en 4 T3 + * + * @author Fred Deniger + * @version $Id: MvExport4T3.java,v 1.5 2007-06-11 13:08:15 deniger Exp $ + */ +public class EfGridDataT64T3Decorator extends EfGridDataRenumeroteDecorator { + + /** + * @param _src + */ + public EfGridDataT64T3Decorator(final EfGridData _src, EfGridInterface newGrid) { + super(_src, newGrid); + } + + @Override + public EfData getData(final CtuluVariable _t, final int _idxTime) throws IOException { + final EfData init = getInit().getData(_t, _idxTime); + final boolean isEle = init.isElementData(); + if (!isEle) { return init; } + if (FuLog.isTrace()) { + FuLog.trace("TRE: 4T3 build for element"); + } + final double[] newValues = new double[getNewGrid().getEltNb()]; + final int oldEltNb = getInit().getGrid().getEltNb(); + for (int i = oldEltNb - 1; i >= 0; i--) { + final double d = init.getValue(i); + newValues[i * 4] = d; + newValues[i * 4 + 1] = d; + newValues[i * 4 + 2] = d; + newValues[i * 4 + 3] = d; + } + return new EfDataElement(newValues); + } +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataToT6Decorator.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataToT6Decorator.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataToT6Decorator.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,66 @@ +package org.fudaa.dodico.ef.decorator; + +import gnu.trove.TIntObjectHashMap; + +import java.io.IOException; + +import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.dodico.ef.EfData; +import org.fudaa.dodico.ef.EfDataNode; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.EfSegment; + +/** + * @author Fred Deniger + * @version $Id: MvExportT6Activity.java,v 1.9 2007-06-11 13:08:16 deniger Exp $ + */ +public class EfGridDataToT6Decorator implements EfGridData { + + final TIntObjectHashMap idxPt_; + final EfGridInterface newGrid_; + final EfGridData old_; + + public EfGridDataToT6Decorator(final EfGridData _old, final TIntObjectHashMap _idxPt, final EfGridInterface _grid) { + super(); + idxPt_ = _idxPt; + newGrid_ = _grid; + old_ = _old; + } + + public boolean isDefined(final CtuluVariable _var) { + return old_.isDefined(_var); + } + + public double getData(final CtuluVariable _o, final int _timeIdx, final int _idxObjet) throws IOException { + if (old_.isElementVar(_o) || _idxObjet < old_.getGrid().getPtsNb()) { return old_ + .getData(_o, _timeIdx, _idxObjet); } + final EfSegment seg = (EfSegment) idxPt_.get(_idxObjet); + return (old_.getData(_o, _timeIdx, seg.getPt1Idx()) + old_.getData(_o, _timeIdx, seg.getPt2Idx())) / 2; + } + + public EfData getData(final CtuluVariable _o, final int _timeIdx) throws IOException { + final EfData old = old_.getData(_o, _timeIdx); + if (old == null || old_.isElementVar(_o)) { return old; } + final double[] data = new double[newGrid_.getPtsNb()]; + + for (int i = old.getSize() - 1; i >= 0; i--) { + data[i] = old.getValue(i); + } + for (int i = old.getSize(); i < data.length; i++) { + final EfSegment seg = (EfSegment) idxPt_.get(i); + data[i] = (old.getValue(seg.getPt1Idx()) + old.getValue(seg.getPt2Idx())) / 2; + + } + return new EfDataNode(data); + } + + public EfGridInterface getGrid() { + return newGrid_; + } + + public boolean isElementVar(final CtuluVariable _idxVar) { + return old_.isElementVar(_idxVar); + } + +} \ No newline at end of file Copied: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTranslateDecorator.java (from rev 4924, trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorTranslation.java) =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTranslateDecorator.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTranslateDecorator.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,57 @@ +/* + * @creation 22 janv. 07 + * @modification $Date: 2007-06-11 13:08:15 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.decorator; + +import java.io.IOException; + +import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.dodico.ef.EfData; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.impl.EfGridTranslate; + +/** + * @author fred deniger + * @version $Id: MvExportDecoratorTranslation.java,v 1.3 2007-06-11 13:08:15 deniger Exp $ + */ +public class EfGridDataTranslateDecorator implements EfGridData { + + final double tx_; + final double ty_; + final EfGridData init_; + final EfGridInterface newTranslated_; + + public EfGridDataTranslateDecorator(final double _tx, final double _ty, final EfGridData _init) { + super(); + tx_ = _tx; + ty_ = _ty; + init_ = _init; + newTranslated_ = new EfGridTranslate(init_.getGrid(), tx_, ty_); + } + + public EfGridInterface getGrid() { + return newTranslated_; + } + + public double getData(final CtuluVariable _o, final int _timeIdx, final int _idxObjet) throws IOException { + return init_.getData(_o, _timeIdx, _idxObjet); + } + + public EfData getData(final CtuluVariable _o, final int _timeIdx) throws IOException { + return init_.getData(_o, _timeIdx); + } + + public boolean isDefined(final CtuluVariable _var) { + return init_.isDefined(_var); + } + + public boolean isElementVar(final CtuluVariable _idxVar) { + return init_.isElementVar(_idxVar); + } + +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/AbstractEfOperation.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/AbstractEfOperation.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/AbstractEfOperation.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,75 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation; + +import org.fudaa.ctulu.CtuluActivity; +import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.dodico.ef.EfGridData; + +/** + * Classe abstraite permettant de g\xE9rer la methode de stop avec une activit\xE9 courante. + * + * @author deniger + */ +public abstract class AbstractEfOperation implements EfOperation { + + CtuluActivity currentActivity; + private boolean frontierChanged; + + protected EfGridData initGrid; + protected boolean stop; + + /** + * @return the currentActivity + */ + protected CtuluActivity getCurrentActivity() { + return currentActivity; + } + + /** + * @return the frontierChanged + */ + protected boolean getFrontierChanged() { + return frontierChanged; + } + + public final EfOperationResult process(ProgressionInterface prog) { + EfOperationResult res = new EfOperationResult(); + res.setAnalyze(new CtuluAnalyze()); + frontierChanged = false; + res.setGridData(process(prog, res.getAnalyze())); + res.setFrontierChanged(frontierChanged); + return res; + } + + protected abstract EfGridData process(ProgressionInterface prog, CtuluAnalyze log); + + /** + * @param currentActivity the currentActivity to set + */ + protected void setCurrentActivity(CtuluActivity currentActivity) { + this.currentActivity = currentActivity; + } + + /** + * Indique que la frontiere a \xE9t\xE9 modifiee + * @param frontierChanged the frontierChanged to set + */ + protected void setFrontierChanged() { + this.frontierChanged = true; + } + + public void setInitGridData(EfGridData in) { + initGrid = in; + + } + + public void stop() { + stop = true; + if (currentActivity != null) currentActivity.stop(); + } + +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperation.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperation.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperation.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,29 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation; + +import org.fudaa.ctulu.CtuluActivity; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.dodico.ef.EfGridData; + +/** + * Activit\xE9 de transformation sur un maillage: non r\xE9entrant. + * + * @author deniger + */ +public interface EfOperation extends CtuluActivity { + + /** + * @param in le maillage a transformer + */ + void setInitGridData(EfGridData in); + + /** + * @param _prog le receveur de progression + * @return le r\xE9sultat de l'op\xE9ration + */ + EfOperationResult process(ProgressionInterface _prog); + +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperationResult.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperationResult.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/EfOperationResult.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,78 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation; + +import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.dodico.ef.EfGridData; + +/** + * Container du r\xE9sultat d'une op\xE9ration sur un maillages + * + * @author deniger + */ +public class EfOperationResult { + + /** + * R\xE9sultat de l'op\xE9ration. Si contient une FatalError les op\xE9rations suivantes doivent s'arreter + */ + CtuluAnalyze analyze; + + /** + * true si la frontiere du maillage a \xE9t\xE9 chang\xE9e + */ + boolean frontierChanged = true; + + /** + * Le r\xE9sultat final de l'op\xE9ration + */ + EfGridData gridData; + + /** + * R\xE9sultat de l'op\xE9ration. Si contient une FatalError les op\xE9rations suivantes doivent s'arreter + * + * @return the analyze + */ + public CtuluAnalyze getAnalyze() { + return analyze; + } + + /** + * @return the gridData Le r\xE9sultat final de l'op\xE9ration + */ + public EfGridData getGridData() { + return gridData; + } + + /** + * @return true si la frontiere du maillage a \xE9t\xE9 chang\xE9e + */ + public boolean isFrontierChanged() { + return frontierChanged; + } + + /** + * R\xE9sultat de l'op\xE9ration. Si contient une FatalError les op\xE9rations suivantes doivent s'arreter + * + * @param analyze the analyze to set + */ + public void setAnalyze(CtuluAnalyze analyze) { + this.analyze = analyze; + } + + /** + * @param frontierNotChanged true si la frontiere du maillage a \xE9t\xE9 chang\xE9e + */ + public void setFrontierChanged(boolean frontierNotChanged) { + this.frontierChanged = frontierNotChanged; + } + + /** + * @param gridData the gridData Le r\xE9sultat final de l'op\xE9ration + */ + public void setGridData(EfGridData gridData) { + this.gridData = gridData; + } + +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT3.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT3.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT3.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,32 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation.type; + +import gnu.trove.TIntIntHashMap; + +import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.dodico.ef.EfElementType; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.decorator.EfGridDataRenumeroteDecorator; +import org.fudaa.dodico.ef.impl.EfLibImpl; +import org.fudaa.dodico.ef.operation.AbstractEfOperation; + +/** + * @author deniger + */ +public class EfOperationToT3 extends AbstractEfOperation { + + @Override + protected EfGridData process(ProgressionInterface prog, CtuluAnalyze log) { + if (super.initGrid.getGrid().getEltType() == EfElementType.T3) { return super.initGrid; } + + TIntIntHashMap eltNewIdxOldIdx = new TIntIntHashMap(super.initGrid.getGrid().getEltNb()); + final EfGridDataRenumeroteDecorator res = new EfGridDataRenumeroteDecorator(initGrid, EfLibImpl.toT3(initGrid + .getGrid(), prog, log, eltNewIdxOldIdx)); + super.setFrontierChanged(); + return res; + } +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT6.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT6.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/operation/type/EfOperationToT6.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -0,0 +1,52 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation.type; + +import gnu.trove.TIntObjectHashMap; +import gnu.trove.TObjectIntHashMap; +import gnu.trove.TObjectIntIterator; + +import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.dodico.ef.EfElementType; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.decorator.EfGridDataToT6Decorator; +import org.fudaa.dodico.ef.impl.EfLibImpl; +import org.fudaa.dodico.ef.operation.AbstractEfOperation; +import org.fudaa.dodico.ef.operation.EfOperationResult; + +/** + * @author deniger + */ +public class EfOperationToT6 extends AbstractEfOperation { + + @Override + protected EfGridData process(ProgressionInterface prog, CtuluAnalyze log) { + // si c'est deja un maillage T6 + if (initGrid.getGrid().getEltType() == EfElementType.T6) { return initGrid; } + EfGridData last = initGrid; + setFrontierChanged(); + if (initGrid.getGrid().getEltType() != EfElementType.T3) { + + EfOperationToT3 toT3 = new EfOperationToT3(); + toT3.setInitGridData(initGrid); + EfOperationResult process = toT3.process(prog); + setCurrentActivity(toT3); + if (process == null) return null; + log.merge(process.getAnalyze()); + } + final TObjectIntHashMap segInt = new TObjectIntHashMap(); + final EfGridInterface gridT6 = EfLibImpl.maillageT3enT6(last.getGrid(), prog, segInt); + if (stop) { return null; } + final TIntObjectHashMap newIdxSeg = new TIntObjectHashMap(segInt.size()); + final TObjectIntIterator iterator = segInt.iterator(); + for (int i = segInt.size(); i-- > 0;) { + iterator.advance(); + newIdxSeg.put(iterator.value(), iterator.key()); + } + return new EfGridDataToT6Decorator(last, newIdxSeg, gridT6); + } +} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExport4T3.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExport4T3.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExport4T3.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -1,51 +0,0 @@ -/* - * @creation 17 mai 2005 - * @modification $Date: 2007-06-11 13:08:15 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail fud...@li... - */ -package org.fudaa.fudaa.meshviewer.export; - -import java.io.IOException; - -import com.memoire.fu.FuLog; - -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.dodico.ef.EfData; -import org.fudaa.dodico.ef.EfDataElement; -import org.fudaa.dodico.ef.EfGridData; - -/** - * @author Fred Deniger - * @version $Id: MvExport4T3.java,v 1.5 2007-06-11 13:08:15 deniger Exp $ - */ -public class MvExport4T3 extends MvExportDecorator { - - /** - * @param _src - */ - public MvExport4T3(final EfGridData _src) { - super(_src); - } - - @Override - public EfData getData(final CtuluVariable _t, final int _idxTime) throws IOException { - final EfData init = src_.getData(_t, _idxTime); - final boolean isEle = init.isElementData(); - if (!isEle) { return init; } - if (FuLog.isTrace()) { - FuLog.trace("TRE: 4T3 build for element"); - } - final double[] newValues = new double[newGrid_.getEltNb()]; - final int oldEltNb = src_.getGrid().getEltNb(); - for (int i = oldEltNb - 1; i >= 0; i--) { - final double d = init.getValue(i); - newValues[i * 4] = d; - newValues[i * 4 + 1] = d; - newValues[i * 4 + 2] = d; - newValues[i * 4 + 3] = d; - } - return new EfDataElement(newValues); - } -} Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportAdaptI.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportAdaptI.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportAdaptI.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -21,7 +21,7 @@ /** * @param _prog la barre de progression * @param _analyze l'analyze - * @return la source transform\xE9 + * @return la source transform\xE9e */ EfGridData process(ProgressionInterface _prog, CtuluAnalyze _analyze); } Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecorator.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecorator.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecorator.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -1,66 +0,0 @@ -/* - * @creation 13 mai 2005 - * @modification $Date: 2007-06-11 13:08:15 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail fud...@li... - */ -package org.fudaa.fudaa.meshviewer.export; - -import gnu.trove.TIntIntHashMap; - -import java.io.IOException; - -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.dodico.ef.EfData; -import org.fudaa.dodico.ef.EfDataElement; -import org.fudaa.dodico.ef.EfDataNode; -import org.fudaa.dodico.ef.EfGridData; -import org.fudaa.dodico.ef.EfGridInterface; - -/** - * @author Fred Deniger - * @version $Id: MvExportDecorator.java,v 1.6 2007-06-11 13:08:15 deniger Exp $ - */ -public class MvExportDecorator implements EfGridData { - - TIntIntHashMap eltNewIdxOldIdx_; - TIntIntHashMap ptNewIdxOldIdx_; - EfGridData src_; - EfGridInterface newGrid_; - - public MvExportDecorator(final EfGridData _src) { - src_ = _src; - } - - public EfGridInterface getGrid() { - return newGrid_; - } - - public boolean isElementVar(final CtuluVariable _idxVar) { - return src_.isElementVar(_idxVar); - } - - public double getData(final CtuluVariable _var, final int _timeIdx, final int _idxObjet) throws IOException { - return getData(_var, _timeIdx).getValue(_idxObjet); - } - - public boolean isDefined(final CtuluVariable _var) { - return src_.isDefined(_var); - } - - public EfData getData(final CtuluVariable _t, final int _idxTime) throws IOException { - final EfData init = src_.getData(_t, _idxTime); - if (init == null) { return null; } - final boolean isEle = init.isElementData(); - if (isEle && eltNewIdxOldIdx_ == null) { return init; } - if (!isEle && ptNewIdxOldIdx_ == null) { return init; } - // le type de la valeur initiale est conserv\xE9e - final double[] newValues = new double[isEle ? newGrid_.getEltNb() : newGrid_.getPtsNb()]; - for (int i = newValues.length - 1; i >= 0; i--) { - final int oldEltIdx = isEle ? eltNewIdxOldIdx_.get(i) : ptNewIdxOldIdx_.get(i); - newValues[i] = init.getValue(oldEltIdx); - } - return isEle ? (EfData) new EfDataElement(newValues) : (EfData) new EfDataNode(newValues); - } -} \ No newline at end of file Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorTranslation.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorTranslation.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportDecoratorTranslation.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -1,57 +0,0 @@ -/* - * @creation 22 janv. 07 - * @modification $Date: 2007-06-11 13:08:15 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.export; - -import java.io.IOException; - -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.dodico.ef.EfData; -import org.fudaa.dodico.ef.EfGridData; -import org.fudaa.dodico.ef.EfGridInterface; -import org.fudaa.dodico.ef.impl.EfGridTranslate; - -/** - * @author fred deniger - * @version $Id: MvExportDecoratorTranslation.java,v 1.3 2007-06-11 13:08:15 deniger Exp $ - */ -public class MvExportDecoratorTranslation implements EfGridData { - - final double tx_; - final double ty_; - final EfGridData init_; - final EfGridInterface newTranslated_; - - public MvExportDecoratorTranslation(final double _tx, final double _ty, final EfGridData _init) { - super(); - tx_ = _tx; - ty_ = _ty; - init_ = _init; - newTranslated_ = new EfGridTranslate(init_.getGrid(), tx_, ty_); - } - - public EfGridInterface getGrid() { - return newTranslated_; - } - - public double getData(final CtuluVariable _o, final int _timeIdx, final int _idxObjet) throws IOException { - return init_.getData(_o, _timeIdx, _idxObjet); - } - - public EfData getData(final CtuluVariable _o, final int _timeIdx) throws IOException { - return init_.getData(_o, _timeIdx); - } - - public boolean isDefined(final CtuluVariable _var) { - return init_.isDefined(_var); - } - - public boolean isElementVar(final CtuluVariable _idxVar) { - return init_.isElementVar(_idxVar); - } - -} Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSourceFilterActivity.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSourceFilterActivity.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSourceFilterActivity.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -24,6 +24,7 @@ import org.fudaa.dodico.ef.EfFilter; import org.fudaa.dodico.ef.EfGridData; import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.decorator.EfGridDataRenumeroteDecorator; import org.fudaa.dodico.ef.impl.EfGridArray; import org.fudaa.fudaa.meshviewer.MvResource; import org.fudaa.fudaa.sig.FSigLib; @@ -78,15 +79,15 @@ stop_ = true; } - private void buildNewGrid(final ProgressionInterface _prog, final BitSet _node, final BitSet _element, - final MvExportDecorator _res) { - if (stop_) { return; } + private EfGridDataRenumeroteDecorator buildNewGrid(final ProgressionInterface _prog, final BitSet _node, + final BitSet _element) { + if (stop_) { return null; } int idxPt = 0; // les nouvelles points final int nbPt = maxPtIdx_ - minPtIdx_ + 1; final int nbElt = maxEltIdx_ - minEltIdx_ + 1; final TDoubleArrayList newPoint = new TDoubleArrayList(nbPt * 3); - _res.ptNewIdxOldIdx_ = new TIntIntHashMap(nbPt); + TIntIntHashMap ptNewIdxOldIdxMap = new TIntIntHashMap(nbPt); final TIntIntHashMap ptOldNew = new TIntIntHashMap(nbPt); final EfGridInterface g = adapter_.getGrid(); // on parcourt les noeuds @@ -94,10 +95,10 @@ up.majProgessionStateOnly(MvResource.getS("Construction maillage")); up.setValue(5, nbPt + nbElt); for (int i = minPtIdx_; i <= maxPtIdx_; i++) { - if (stop_) { return; } + if (stop_) { return null; } // si selectionn\xE9, on ajoute le no if (_node.get(i)) { - _res.ptNewIdxOldIdx_.put(idxPt, i); + ptNewIdxOldIdxMap.put(idxPt, i); ptOldNew.put(i, idxPt); newPoint.add(g.getPtX(i)); newPoint.add(g.getPtY(i)); @@ -111,15 +112,15 @@ } int idxElem = 0; final ArrayList newElement = new ArrayList(nbElt); - _res.eltNewIdxOldIdx_ = new TIntIntHashMap(nbElt); + TIntIntHashMap eltNewIdxOldIdxMap = new TIntIntHashMap(nbElt); for (int i = minEltIdx_; i <= maxEltIdx_; i++) { - if (stop_) { return; } + if (stop_) { return null; } if (_element.get(i)) { final int[] idx = g.getElement(i).getIndices(); for (int j = idx.length - 1; j >= 0; j--) { idx[j] = ptOldNew.get(idx[j]); } - _res.eltNewIdxOldIdx_.put(idxElem, i); + eltNewIdxOldIdxMap.put(idxElem, i); newElement.add(new EfElement(idx)); idxElem++; } @@ -130,7 +131,11 @@ FuLog.trace("nb elt filtres" + elt.length); } newElement.toArray(elt); - _res.newGrid_ = new EfGridArray(newPoint.toNativeArray(), elt); + EfGridDataRenumeroteDecorator res = new EfGridDataRenumeroteDecorator(adapter_, new EfGridArray(newPoint + .toNativeArray(), elt)); + res.setEltNewIdxOldIdxMap(eltNewIdxOldIdxMap); + res.setPtNewIdxOldIdxMap(ptNewIdxOldIdxMap); + return res; } public EfGridData buildNewAdapter(final ProgressionInterface _prog, final CtuluAnalyze _analyze) { @@ -146,8 +151,7 @@ final BitSet test = new BitSet(adapter_.getGrid().getEltNb()); test.set(0, adapter_.getGrid().getEltNb() - 1); if (test.equals(element)) { return adapter_; } - final MvExportDecorator newAdapter = new MvExportDecorator(adapter_); - buildNewGrid(_prog, node, element, newAdapter); + final EfGridDataRenumeroteDecorator newAdapter = buildNewGrid(_prog, node, element); if (stop_) { return null; } return newAdapter; } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6Activity.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6Activity.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6Activity.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -13,6 +13,7 @@ import java.io.IOException; +import org.fudaa.ctulu.CtuluActivity; import org.fudaa.ctulu.CtuluAnalyze; import org.fudaa.ctulu.CtuluVariable; import org.fudaa.ctulu.ProgressionInterface; @@ -23,6 +24,8 @@ import org.fudaa.dodico.ef.EfGridInterface; import org.fudaa.dodico.ef.EfSegment; import org.fudaa.dodico.ef.impl.EfLibImpl; +import org.fudaa.dodico.ef.operation.EfOperationResult; +import org.fudaa.dodico.ef.operation.type.EfOperationToT6; /** * Cette procedure permet de transformer un maillage en T6. Elle permet de garder les coordonn\xE9es en Z. @@ -36,7 +39,7 @@ boolean stop_; - MvExportAdaptI current_; + CtuluActivity current_; /** * @param _src @@ -48,27 +51,12 @@ public EfGridData process(final ProgressionInterface _prog, final CtuluAnalyze _analyze) { stop_ = false; - // si c'est deja un maillage T6 - if (src_.getGrid().getEltType() == EfElementType.T6) { return src_; } - // si c'est pas un maillage T6 on oublie - EfGridData last = src_; - if (src_.getGrid().getEltType() != EfElementType.T3) { - current_ = new MvExportToT3Activity(src_); - last = current_.process(_prog, _analyze); - if (last == null || _analyze.containsFatalError() || stop_) { return null; } - current_ = null; - } - final TObjectIntHashMap segInt = new TObjectIntHashMap(); - final EfGridInterface gridT6 = EfLibImpl.maillageT3enT6(last.getGrid(), _prog, segInt); - if (stop_) { return null; } - final TIntObjectHashMap newIdxSeg = new TIntObjectHashMap(segInt.size()); - final TObjectIntIterator iterator = segInt.iterator(); - for (int i = segInt.size(); i-- > 0;) { - iterator.advance(); - newIdxSeg.put(iterator.value(), iterator.key()); - } - - return new T6GridDataAdapter(last, newIdxSeg, gridT6); + EfOperationToT6 toT6 = new EfOperationToT6(); + toT6.setInitGridData(src_); + current_ = toT6; + EfOperationResult process = toT6.process(_prog); + _analyze.merge(process.getAnalyze()); + return process.getGridData(); } public void stop() { @@ -78,58 +66,4 @@ stop_ = true; } - /** - * @author Fred Deniger - * @version $Id: MvExportT6Activity.java,v 1.9 2007-06-11 13:08:16 deniger Exp $ - */ - private static class T6GridDataAdapter implements EfGridData { - - final TIntObjectHashMap idxPt_; - final EfGridInterface newGrid_; - final EfGridData old_; - - public T6GridDataAdapter(final EfGridData _old, final TIntObjectHashMap _idxPt, final EfGridInterface _grid) { - super(); - idxPt_ = _idxPt; - newGrid_ = _grid; - old_ = _old; - } - - public boolean isDefined(final CtuluVariable _var) { - return old_.isDefined(_var); - } - - public double getData(final CtuluVariable _o, final int _timeIdx, final int _idxObjet) throws IOException { - if (old_.isElementVar(_o) || _idxObjet < old_.getGrid().getPtsNb()) { return old_ - .getData(_o, _timeIdx, _idxObjet); } - final EfSegment seg = (EfSegment) idxPt_.get(_idxObjet); - return (old_.getData(_o, _timeIdx, seg.getPt1Idx()) + old_.getData(_o, _timeIdx, seg.getPt2Idx())) / 2; - } - - public EfData getData(final CtuluVariable _o, final int _timeIdx) throws IOException { - final EfData old = old_.getData(_o, _timeIdx); - if (old == null || old_.isElementVar(_o)) { return old; } - final double[] data = new double[newGrid_.getPtsNb()]; - - for (int i = old.getSize() - 1; i >= 0; i--) { - data[i] = old.getValue(i); - } - for (int i = old.getSize(); i < data.length; i++) { - final EfSegment seg = (EfSegment) idxPt_.get(i); - data[i] = (old.getValue(seg.getPt1Idx()) + old.getValue(seg.getPt2Idx())) / 2; - - } - return new EfDataNode(data); - } - - public EfGridInterface getGrid() { - return newGrid_; - } - - public boolean isElementVar(final CtuluVariable _idxVar) { - return old_.isElementVar(_idxVar); - } - - } - } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6T3Activity.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6T3Activity.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportT6T3Activity.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -14,6 +14,8 @@ import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.dodico.ef.EfElementType; import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.decorator.EfGridDataRenumeroteDecorator; +import org.fudaa.dodico.ef.decorator.EfGridDataT64T3Decorator; import org.fudaa.dodico.ef.impl.EfLibImpl; /** @@ -54,9 +56,8 @@ } // T6->T3 if (!fourT3_) { - final MvExportDecorator res = new MvExportDecorator(src_); final TIntIntHashMap oldPtnewPt = new TIntIntHashMap(); - res.newGrid_ = EfLibImpl.maillageT6enT3(src_.getGrid(), _prog, oldPtnewPt); + final EfGridDataRenumeroteDecorator res = new EfGridDataRenumeroteDecorator(src_,EfLibImpl.maillageT6enT3(src_.getGrid(), _prog, oldPtnewPt)); final TIntIntHashMap newPtOld = new TIntIntHashMap(oldPtnewPt.size()); final TIntIntIterator it = oldPtnewPt.iterator(); for (int i = oldPtnewPt.size(); i-- > 0;) { @@ -65,15 +66,14 @@ } if (stop_) { return null; } - res.eltNewIdxOldIdx_ = null; - res.ptNewIdxOldIdx_ = newPtOld; + res.setEltNewIdxOldIdxMap(null); + res.setPtNewIdxOldIdxMap(newPtOld); return res; } - final MvExportDecorator res = new MvExport4T3(src_); + final EfGridDataRenumeroteDecorator res = new EfGridDataT64T3Decorator(src_,EfLibImpl.maillageT6en4T3(src_.getGrid(), _prog)); if (stop_) { return null; } - res.newGrid_ = EfLibImpl.maillageT6en4T3(src_.getGrid(), _prog); - res.eltNewIdxOldIdx_ = null; - res.ptNewIdxOldIdx_ = null; + res.setEltNewIdxOldIdxMap(null); + res.setPtNewIdxOldIdxMap(null); return res; } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportTaskSkeleton.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportTaskSkeleton.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportTaskSkeleton.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -30,6 +30,7 @@ import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ctulu.interpolation.InterpolationVectorContainer; import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.decorator.EfGridDataTranslateDecorator; import org.fudaa.dodico.h2d.type.H2dVariableType; import org.fudaa.fudaa.commun.FudaaLib; import org.fudaa.fudaa.commun.FudaaPreferences; @@ -435,7 +436,7 @@ final double tyDouble = ((Number) ty).doubleValue(); setOldXValues(txDouble); setOldYValues(tyDouble); - src = new MvExportDecoratorTranslation(txDouble, tyDouble, src); + src = new EfGridDataTranslateDecorator(txDouble, tyDouble, src); } } if (pnVar_ != null) { Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportToT3Activity.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportToT3Activity.java 2009-10-06 15:22:19 UTC (rev 5179) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportToT3Activity.java 2009-10-06 21:31:20 UTC (rev 5180) @@ -13,7 +13,10 @@ import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.dodico.ef.EfElementType; import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.decorator.EfGridDataRenumeroteDecorator; import org.fudaa.dodico.ef.impl.EfLibImpl; +import org.fudaa.dodico.ef.operation.EfOperationResult; +import org.fudaa.dodico.ef.operation.type.EfOperationToT3; /** * PErmet de transformer un maillage en T3. @@ -35,14 +38,10 @@ } public EfGridData process(final ProgressionInterface _prog, final CtuluAnalyze _analyze) { - stop_ = false; - // si c'est deja un maillage T3 - if (src_.getGrid().getEltType() == EfElementType.T3) { return src_; } - final MvExportDecorator res = new MvExportDecorator(src_); - res.eltNewIdxOldIdx_ = new TIntIntHashMap(src_.getGrid().getEltNb()); - res.newGrid_ = EfLibImpl.toT3(src_.getGrid(), _prog, _analyze, res.eltNewIdxOldIdx_); - if (stop_) { return null; } - return res; - + EfOperationToT3 toT3 = new EfOperationToT3(); + toT3.setInitGridData(src_); + EfOperationResult process = toT3.process(_prog); + _analyze.merge(process.getAnalyze()); + return process.getGridData(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2009-10-13 21:37:40
|
Revision: 5256 http://fudaa.svn.sourceforge.net/fudaa/?rev=5256&view=rev Author: deniger Date: 2009-10-13 21:37:28 +0000 (Tue, 13 Oct 2009) Log Message: ----------- Modified Paths: -------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesGEOFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesGEOWriter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesMAIFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesMAIReader.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesMAIWriter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesVersionInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/trigrid/TrigridFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/trigrid/TrigridReader.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/trigrid/TrigridWriter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/resource/H2dResource.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/resource/h2d_en.fr_txt trunk/fudaa_devel/dodico/src/org/fudaa/dodico/olb/exec/OLBExec.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CLTransitoireFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CrbFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/PnTransitoireFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/Telemac2dFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/TelemacDicoFileFormatVersion.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/TelemacCLFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/TelemacLiquideFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/TelemacVariableMapper.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/ef/TestJSearchInGrid.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/reflux/TestJCorEleBth.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/reflux/TestJDunes.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/telemac/TestJClMng.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/telemac/TestJSerafin.java trunk/fudaa_devel/dodico/test/org/fudaa/dodico/telemac/TestJTrigrid.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportActSerafin.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportCorEleBthGridAct.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFactory.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportSerafinFormatAdapter.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/impl/MvActLoadDefault.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlProjectExportPanel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerExporter.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderSerafin.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardFileMng.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/common/TrFileFormatManager.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/export/TrExportFactory.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/export/TrExportRefluxSovAct.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInspectorReaderSerafin.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostMultiSourceActivator.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostMultiSourceActivator2.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceBuilder.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceReaderSerafin.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceTelemac3D.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxAppliManager.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxImplHelper.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacAppliManager.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacSerafinBuilder.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacSerafinHelper.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacSerafinSaver.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacSiActivateDialog.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacSiActivator.java trunk/fudaa_devel/fudaa/test/org/fudaa/fudaa/tr/TestJTrPostProject.java trunk/fudaa_devel/fudaa/test/org/fudaa/fudaa/tr/TestTrMaillage.java trunk/fudaa_devel/fudaa/test/org/fudaa/fudaa/tr/TestTransformationCorEleBthSerafin.java Added Paths: ----------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/EfIOResource.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthReader.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthWriter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/efio_en.fr_txt trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinFileFilter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinFileFormatVersionInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinGisAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinGridSourceAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinMaillageAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinMaillageBuilderAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinMaillageBuilderAdapterAbstract.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinNewReader.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinNewReaderInfo.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinVolumeFileFilter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinVolumeFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/serafin/SerafinWriter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/trigrid/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/io/ Removed Paths: ------------- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dFileFormatType.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthReader.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthWriter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormatVersionInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinGisAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinGridSourceAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinInterface.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinMaillageAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinMaillageBuilderAdapter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinMaillageBuilderAdapterAbstract.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinNewReader.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinNewReaderInfo.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinVolumeFileFilter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinVolumeFileFormat.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinWriter.java trunk/fudaa_devel/dodico/src/org/fudaa/dodico/trigrid/ Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/EfIOResource.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/EfIOResource.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/EfIOResource.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -0,0 +1,33 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.io; + +import com.memoire.bu.BuResource; + +import org.fudaa.dodico.commun.DodicoResource; + +/** + * @author deniger + */ +public class EfIOResource extends DodicoResource { + + public final static EfIOResource EFIO = new EfIOResource(DodicoResource.DODICO); + + public static String getS(final String _s) { + return EFIO.getString(_s); + } + + public static String getS(final String _s, final String _v0) { + return EFIO.getString(_s, _v0); + } + + public static String getS(final String _s, final String _v0, final String _v1) { + return EFIO.getString(_s, _v0, _v1); + } + + private EfIOResource(final BuResource _parent) { + super(_parent); + } +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthAdapter.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthAdapter.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthAdapter.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -0,0 +1,41 @@ +/** + * @creation 10 mars 2003 + * @modification $Date: 2007-01-19 13:07:21 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.io.corelebth; + +import org.fudaa.ctulu.fileformat.FileFormat; + +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.impl.EfGridSourcesAbstract; + +/** + * @author deniger + * @version $Id: CorEleBthAdapter.java,v 1.13 2007-01-19 13:07:21 deniger Exp $ + */ +public class CorEleBthAdapter extends EfGridSourcesAbstract implements CorEleBthInterface { + private EfGridInterface maillage_; + + public CorEleBthAdapter() { + super(); + } + + public EfGridInterface getGrid() { + return maillage_; + } + + /** + * @param _s le maillage a utiliser + */ + public void setMaillage(final EfGridInterface _s) { + maillage_ = _s; + } + + public FileFormat getFileFormat() { + return CorEleBthFileFormat.getInstance(); + } + +} Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthFileFormat.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthFileFormat.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthFileFormat.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -0,0 +1,225 @@ +/** + * @creation 13 mars 2003 + * @modification $Date: 2007-01-19 13:07:21 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.io.corelebth; + +import java.io.File; + +import org.fudaa.ctulu.CtuluIOOperationSynthese; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.ctulu.fileformat.FileFormatUnique; +import org.fudaa.ctulu.fileformat.FileReadOperationAbstract; +import org.fudaa.ctulu.fileformat.FileWriteOperationAbstract; +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.EfGridSource; +import org.fudaa.dodico.ef.EfLib; +import org.fudaa.dodico.ef.FileFormatGridVersion; +import org.fudaa.dodico.ef.impl.EfGrid; +import org.fudaa.dodico.ef.io.EfIOResource; +import org.fudaa.dodico.fichiers.FileFormatSoftware; + +/** + * @author deniger + * @version $Id: CorEleBthFileFormat.java,v 1.29 2007-01-19 13:07:21 deniger Exp $ + */ +public class CorEleBthFileFormat extends FileFormatUnique implements FileFormatGridVersion{ + + + /** + * LE nombre de fichier necessaire pour ce format. + */ + public final static int NB_FILE = 3; + private static final CorEleBthFileFormat INSTANCE = new CorEleBthFileFormat(); + + /** + * @return le singleton + */ + public static final CorEleBthFileFormat getInstance() { + return INSTANCE; + } + + public String[] getLinkedExtension() { + return extensions_; + } + + protected CorEleBthFileFormat() { + super(NB_FILE); + extensions_ = new String[] { "cor", "ele", "bth" }; + id_ = "CORELEBTH"; + nom_ = "Cor, ele, bth"; + description_ = EfIOResource.getS("Contient des donn\xE9es concernant le mod\xE8le num\xE9rique de terrain uniquement." + + " Compatible avec le format MEF/Mosaic v2.6"); + software_ = FileFormatSoftware.REFLUX_IS; + } + + /** + * @return reader + */ + public CorEleBthReader createCorEleBthReader() { + return new CorEleBthReader(this); + } + + /** + * @return writer + */ + public CorEleBthWriter createCorEleBthWriter() { + return new CorEleBthWriter(this); + } + + /** + * @param _f le fichier cible + * @param _inter la source a utiliser pour l'ecriture + * @param _prog la barre de progression + * @return la synthese de l'operation + */ + public CtuluIOOperationSynthese write(final File _f, final CorEleBthInterface _inter, final ProgressionInterface _prog) { + final CorEleBthWriter w = createCorEleBthWriter(); + w.setFile(_f); + w.setProgressReceiver(_prog); + return w.write(_inter); + } + + /** + * @param _cor Fichier cible cor + * @param _ele Fichier cible ele + * @param _bth Fichier cible bth + * @param _inter la source pour l'ecriture + * @param _prog la barre de progression + * @return la synthese de l'operation + */ + public CtuluIOOperationSynthese write(final File _cor, final File _ele, final File _bth, + final CorEleBthInterface _inter, final ProgressionInterface _prog) { + final CorEleBthWriter w = createCorEleBthWriter(); + w.setFile(_cor, _ele, _bth); + w.setProgressReceiver(_prog); + return w.write(_inter); + } + + /** + * @return Largeur simple. + */ + public int getSimpleColumLength() { + return 5; + } + + /** + * @return Largeur double. + */ + public int getDoubleColumLength() { + return 10; + } + + /** + * @return Largeur de la 2eme colonne du fichier ele. + */ + public int getEleSecondColumnLength() { + return 25; + } + + /** + * @return Largeur d'une colonne du fichier bth. + */ + public int getBthColumnLength() { + return 12; + } + + /** + * @return Nombre de points par ligne dans le fichier bth. + */ + public int getBthPointByLine() { + return 6; + } + + /** + * + */ + public FileReadOperationAbstract createReader() { + return createCorEleBthReader(); + } + + /** + * + */ + public FileWriteOperationAbstract createWriter() { + return createCorEleBthWriter(); + } + + /** + * @param _f le fichier cible + * @param _m source + * @param _prog barre de progression + * @return synthese de l'operation + */ + public CtuluIOOperationSynthese writeGrid(final File _f, final EfGridInterface _m, final ProgressionInterface _prog) { + final CorEleBthAdapter inter = new CorEleBthAdapter(); + inter.setMaillage(_m); + return write(_f, inter, _prog); + } + + public CtuluIOOperationSynthese writeGridSimpleColumn(final File _f, final EfGridInterface _m, + final ProgressionInterface _prog) { + final CorEleBthAdapter inter = new CorEleBthAdapter(); + inter.setMaillage(_m); + final CorEleBthWriter w = createCorEleBthWriter(); + w.setFile(_f); + w.setSimpleColumn(true); + w.setProgressReceiver(_prog); + return w.write(inter); + } + + public CtuluIOOperationSynthese writeGrid(final File _f, final EfGridSource _m, final ProgressionInterface _prog) { + return writeGrid(_f, _m.getGrid(), _prog); + } + + /** + * + */ + public CtuluIOOperationSynthese readGrid(final File _f, final ProgressionInterface _prog) { + return read(_f, _prog); + } + + /** + * Lit le maillage, calcul le bord et oriente les \xE9l\xE9ments dans le sens trigo. + * + * @param _f le fichier a lire + * @param _prog la barre de progress + * @return synthese de l'operation (EfGrid comme source) + */ + public CtuluIOOperationSynthese readGridStrict(final File _f, final ProgressionInterface _prog) { + final CtuluIOOperationSynthese f = readGrid(_f, _prog); + if (f == null || f.getSource() == null) { + return f; + } + EfLib.orienteGrid((EfGrid) f.getSource(), _prog, true, f.getAnalyze()); + ((EfGrid) f.getSource()).computeBord(_prog, f.getAnalyze()); + return f; + } + + /** + * + */ + public boolean canWriteOnlyGrid() { + return true; + } + + /** + * + */ + public CtuluIOOperationSynthese readListPoint(final File _f, final ProgressionInterface _prog) { + final CtuluIOOperationSynthese r = read(_f, _prog); + r.setSource(((CorEleBthInterface) r.getSource()).getGrid()); + return null; + } + + /** + * + */ + public boolean containsGrid() { + return true; + } + +} \ No newline at end of file Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthInterface.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthInterface.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthInterface.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -0,0 +1,18 @@ +/** + * @creation 10 mars 2003 + * @modification $Date: 2006-09-19 14:45:48 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.io.corelebth; + +import org.fudaa.dodico.ef.EfGridSource; + +/** + * @author deniger + * @version $Id: CorEleBthInterface.java,v 1.14 2006-09-19 14:45:48 deniger Exp $ + */ +public interface CorEleBthInterface extends EfGridSource { + +} \ No newline at end of file Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthReader.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthReader.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthReader.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -0,0 +1,469 @@ +/** + * @creation 21 f\xE9vr. 2003 + * @modification $Date: 2007-06-20 12:21:44 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.io.corelebth; + +import gnu.trove.TIntArrayList; + +import java.io.EOFException; +import java.io.File; +import java.io.IOException; +import java.io.Reader; +import java.util.Arrays; + +import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.ctulu.CtuluLibMessage; +import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.ProgressionUpdater; +import org.fudaa.ctulu.fileformat.FileFormat; +import org.fudaa.ctulu.fileformat.FileFormatVersionInterface; +import org.fudaa.ctulu.fileformat.FileOperationAbstract; +import org.fudaa.ctulu.fileformat.FileReadOperationAbstract; +import org.fudaa.ctulu.fileformat.FortranInterface; + +import org.fudaa.dodico.commun.DodicoLib; +import org.fudaa.dodico.ef.EfElement; +import org.fudaa.dodico.ef.EfElementType; +import org.fudaa.dodico.ef.EfLib; +import org.fudaa.dodico.ef.EfNode; +import org.fudaa.dodico.ef.impl.EfGridMutable; +import org.fudaa.dodico.ef.io.EfIOResource; +import org.fudaa.dodico.fortran.FortranReader; + +/** + * Lecture des fichiers cor,ele,bth. + * + * @author Bertrand Marchand, Fred Deniger + * @version $Id: CorEleBthReader.java,v 1.36 2007-06-20 12:21:44 deniger Exp $ + */ +public class CorEleBthReader extends FileReadOperationAbstract { + + private final CorEleBthFileFormat version_; + FortranReader corIn_; + FortranReader eleIn_; + FortranReader bthIn_; + + /** + * Le constructeur par defaut. Les parametres <code>_cor</code> et <code>_ele</code> peuvent etre nuls. + * + * @param _format version + */ + public CorEleBthReader(final CorEleBthFileFormat _format) { + version_ = _format; + } + + private void setIn(final Reader _corIn, final Reader _eleIn, final Reader _bthIn) { + setIn(_corIn == null ? null : new FortranReader(_corIn), _eleIn == null ? null : new FortranReader(_eleIn), + _bthIn == null ? null : new FortranReader(_bthIn)); + } + + public void setFile(final File _f) { + setFile(version_.getFileFormat().getFile(_f)); + } + + /** + * @param _f les fichiers cor,ele,bth + */ + public void setFile(final File[] _f) { + if (_f.length != CorEleBthFileFormat.NB_FILE) { throw new IllegalArgumentException("Number of file expected : 3"); } + analyze_ = new CtuluAnalyze(); + analyze_.setResource(_f[0].getAbsolutePath()); + setIn(FileOperationAbstract.initFileReader(_f[0]), FileOperationAbstract.initFileReader(_f[1]), + FileOperationAbstract.initFileReader(_f[2])); + } + + /** + * @param _cor fichier cor + * @param _ele fichier ele + * @param _bth fichier bth + */ + public void setIn(final File _cor, final File _ele, final File _bth) { + analyze_ = new CtuluAnalyze(); + analyze_.setResource(_cor.getAbsolutePath()); + setIn(FileOperationAbstract.initFileReader(_cor), FileOperationAbstract.initFileReader(_ele), FileOperationAbstract + .initFileReader(_bth)); + } + + private void setIn(final FortranReader _corIn, final FortranReader _eleIn, final FortranReader _bthIn) { + if (_corIn == null) { + analyze_.addFatalError(EfIOResource.getS("Le flux de coordonn\xE9es est null")); + return; + } + if (_eleIn == null) { + analyze_.addFatalError(EfIOResource.getS("Le flux de \xE9l\xE9ments est null")); + return; + } + + corIn_ = _corIn; + eleIn_ = _eleIn; + bthIn_ = _bthIn; + } + + /** + * Lecture des fichiers. Le resultat stock\xE9 et obtenu avec <code>getMaillage()</code>. Si l'analyse ( + * <code>getAnalyse()</code>) poss\xE8de une erreur, le maillage doit etre nul. + * + * @return le resultat de l'ecriture + */ + public CorEleBthAdapter readCorEleBth() { + CorEleBthAdapter inter = null; + EfGridMutable maillage; + int percBegin = 0; + int percLength = 40; + EfNode[] pts; + if (corIn_ == null) { + analyze_.addFatalError(EfIOResource.getS("Le flux de coordonn\xE9es est null")); + return null; + } + try { + pts = readCor(percBegin, percLength); + } catch (final IOException _e) { + analyze_.manageException(_e); + return null; + } + if (pts == null) { return null; } + maillage = new EfGridMutable(pts, null); + // lecture des elements + // pour le pourcentage d'avancement on suppose que la lecture + // des elements prend 40% du temps et part de 40. + percBegin += percLength; + // H2dElement[] elems= null; + try { + readEle(maillage, percBegin, percLength, pts.length); + } catch (final IOException _e) { + analyze_.manageException(_e); + } + if (!maillage.isEltDefini()) { return null; } + // gestion de l'avancement + percBegin += percLength; + if (bthIn_ == null) { + analyze_.addWarn(EfIOResource.getS("Les donn\xE9es concernant la bathym\xE9trie sont introuvables"), -1); + return null; + } + percLength = 20; + // si fichier de bathy, on met a jour la bathy. + // pour le pourcentage d'avancement on suppose que la lecture + // de la bathy prend 20% du temps et part de 80. + try { + readBth(percBegin, percLength, maillage); + } catch (final IOException _e) { + analyze_.manageException(_e); + } + inter = new CorEleBthAdapter(); + inter.setMaillage(maillage); + EfLib.orienteGrid(maillage, progress_, true, analyze_); + return inter; + // isDone_ = true; + } + + /** + * Les fichiers elements donnent le nombre d'elements et les numeros des noeuds composant chaque element. Seuls les + * elements T3 et T6 sont acceptes. + */ + private void readEle(final EfGridMutable _maillage, final int _percBegin, final int _percLength, final int _nbMaxPoint) + throws IOException { + EfElement[] ele = null; + final int doubleLength = version_.getDoubleColumLength(); + final int simpleLength = version_.getSimpleColumLength(); + final String analPref = "ELE "; + eleIn_.setBlankZero(true); + try { + // Les formats de ce fichier peut varier. Il faut tester la deuxieme + // ligne pour savoir si les champs sont de longueur double ou simple. + // On marque le debut du re pour revenir en suite. + // Au max, la premiere ligne contient 5champs de taille double. + // la deuxieme ligne contient 13 champs de taille double. + // pour etre sur, on prendra une marque pour 20 champs. + eleIn_.mark(20 * doubleLength); + // Lecture de la premiere ligne + eleIn_.readLine(); + int format = doubleLength; + // Lecture de la deuxieme ligne et test + if (isSimpleFormat(eleIn_.readLine())) { + format = simpleLength; + } + // on connait la largeur des colonnes on peut lire. + eleIn_.reset(); + // Premiere ligne : <nombre d'\xE9l\xE9ments>,<nombre de noeuds/\xE9l\xE9ment> + // (Les champs suivants importent peu) + eleIn_.readFields(); + // Le format depend du nombre d'elements + // Le nombre d'elements + final int nbElements = eleIn_.intField(0); + // le nombre max de points par elements + final int nbMaxPts = eleIn_.intField(1); + if (nbMaxPts == 3) { + _maillage.setTypeElt(EfElementType.T3); + } else if (nbMaxPts == 6) { + _maillage.setTypeElt(EfElementType.T6); + } else { + // _maillage.setElts(null); + analyze_.addWarn(analPref + EfIOResource.getS("Seuls les \xE9l\xE9ments T3 ou T6 sont correctement trait\xE9s"), eleIn_ + .getLineNumber()); + // return; + } + // Connectivit\xE9s + // Le format par defaut pour toutes les lignes. + final int[] fmt = new int[] { format, version_.getEleSecondColumnLength(), format, format, format, format, + format, format, format }; + final int indexMax = _nbMaxPoint; + int indexPt; + ele = new EfElement[nbElements]; + TIntArrayList connect = new TIntArrayList(nbMaxPts); + // Getion de l'etat d'avancement + final ProgressionUpdater up = new ProgressionUpdater(progress_); + up.setValue(nbElements, 4, _percBegin, _percLength); + up.majProgessionStateOnly(); + boolean errorForIndiceDone = false; + for (int i = 0; i < nbElements; i++) { + // Le tableau qui contiendra temporaire les connexions. + + // on parse la ligne + eleIn_.readFields(fmt); + // if (nbPtInElem > 3) System.out.println(eleIn_.getNumberOfNotEmptyField()); + connect.resetQuick(); + if (eleIn_.intField(0) != (i + 1)) { + final double nbValue = Math.log(i + 1) / Math.log(10); + boolean ok = false; + if (nbValue >= format) { + fmt[0]++; + eleIn_.analyzeCurrentLine(fmt); + ok = eleIn_.intField(0) == (i + 1); + } + if (!ok && !errorForIndiceDone) { + errorForIndiceDone = true; + analyze_.addError(analPref + EfIOResource.getS("L'indice est invalide") + + CtuluLibString.getEspaceString(eleIn_.getLineNumber()), eleIn_.getLineNumber()); + analyze_.addInfo(analPref + EfIOResource.getS("Indice attendu") + ": " + (i + 1), eleIn_.getLineNumber()); + } + } + + int numberOfFields = eleIn_.getNumberOfFields(); + int idx = 0; + for (int numChamp = 2; numChamp < numberOfFields && idx < nbMaxPts; numChamp++) { + + // Les 2 premiers champs sont ignores. + indexPt = eleIn_.intField(numChamp); + + if ((indexPt > indexMax) || (indexPt < 0)) { + analyze_.addError(analPref + + EfIOResource.getS("L'indice {0} n'est pas valide", CtuluLibString.getString(indexPt)), eleIn_ + .getLineNumber()); + analyze_.addInfo(analPref + EfIOResource.getS("L'indice doit appartenir \xE0 l'intervalle") + " [1," + + indexMax + "]", eleIn_.getLineNumber()); + return; + } + if (indexPt > 0) { + connect.add(indexPt - 1); + idx++; + } else break; + } + if (connect.size() < 3) { + analyze_.addFatalError(DodicoLib.getS("L'\xE9l\xE9ment {0} est mal d\xE9fini", CtuluLibString.getString(i + 1))); + return; + } + ele[i] = new EfElement(connect.toNativeArray()); + // maj de l'avancement + up.majAvancement(); + } + } catch (final EOFException _e) { + if (CtuluLibMessage.DEBUG) { + CtuluLibMessage.debug("Reading end"); + } + } catch (final NumberFormatException fe) { + analyze_.manageException(fe, eleIn_.getLineNumber()); + return; + } + // verif si le dernier element est bien defini. + if (ele != null && ele[ele.length - 1] == null) { + analyze_.addFatalError(analPref + EfIOResource.getS("Des \xE9l\xE9ments ne sont pas d\xE9finis"), eleIn_.getLineNumber()); + return; + } + _maillage.setElts(ele); + } + + /** + * Renvoie true si le 4eme caractere est est 1 est le 3eme " " le format est de longueur simple. + */ + private static boolean isSimpleFormat(final String _l) { + if (((_l.charAt(4) == '1') && (_l.charAt(3) == ' '))) { return true; } + return false; + } + + /** + * Lecture du fichier contenant les coordonnees. Le fichier cor est un fichier dans les champs ont des largeurs fixes. + */ + private EfNode[] readCor(final int _percBegin, final int _percLength) throws IOException { + EfNode[] pts = null; + final int doubleFormat = version_.getDoubleColumLength(); + try { + // Les formats des colonnes de ce fichier peut varier. + // Il faut tester la deuxieme ligne pour savoir si les champs sont de longueur double ou + // simple. + // On marque le debut du buffer pour revenir en suite. + // Au max, la premiere ligne contient 6 champs de taille double. + // la deuxieme ligne contient 3 champs de taille double. + // pour etre sur, on prendra une marque pour 10 champs. + corIn_.mark(10 * doubleFormat); + // Lecture de la premiere ligne + corIn_.readLine(); + int format = doubleFormat; + // Lecture de la deuxieme ligne et test + if (isSimpleFormat(corIn_.readLine())) { + format = version_.getSimpleColumLength(); + } + // La premiere ligne contient le nombre de noeuds a lire. + // <nombre de noeuds> (Les champs suivants importent peu) + corIn_.reset(); + corIn_.readFields(); + // lecture du nombre de noeuds enfin... + final int nbPts = corIn_.intField(0); + pts = new EfNode[nbPts]; + int num; + // Gestion de l'avancement + final ProgressionUpdater up = new ProgressionUpdater(progress_); + up.setValue(10, nbPts, _percBegin, _percLength); + up.majProgessionStateOnly(); + final int[] fmt = new int[] { format, doubleFormat, doubleFormat }; + for (int i = 0; i < nbPts; i++) { + // Coordonn\xE9es <x>,<y> + corIn_.readFields(fmt); + num = corIn_.intField(0); + // Si le numero du point ne correspond pas, on arrete la lecture + // et on renvoie un message d'erreur. + if (num != i + 1) { + analyze_.addError(EfIOResource.getS("L'index du noeud {0} ne correspond pas", CtuluLibString.getString(num)), + corIn_.getLineNumber()); + return null; + } + pts[i] = new EfNode(corIn_.doubleField(1), corIn_.doubleField(2), 0); + // maj de l'avancement + up.majAvancement(); + } + } catch (final EOFException e) { + if (CtuluLibMessage.DEBUG) { + CtuluLibMessage.debug("Reading end"); + } + } catch (final NumberFormatException fe) { + analyze_.manageException(fe, corIn_.getLineNumber()); + return null; + } + // la lecture est terminee.... + return pts; + } + + /** + * Lecture du fichier contenant la bathymetrie. Il y a <code>BTH_PT_BY_LINE</code> cotes par ligne. + * + * @param _pts les points a modifier. + */ + private void readBth(final int _percBegin, final int _percLength, final EfGridMutable _maillage) throws IOException { + // L'index du point a modifier. + int index = 0; + // le nombre de point a modifier. + final int l = _maillage.getPtsNb(); + try { + final int pointParLigne = version_.getBthPointByLine(); + // initialisation du format. + // Le nombre de point par ligne est stocke dans CorEleBthInterface.BTH_PT_BY_LINE + final int[] fmt = new int[pointParLigne]; + // Gestion de l'avancement + final ProgressionUpdater up = new ProgressionUpdater(progress_); + up.setValue(l, 4, _percBegin, _percLength); + up.majProgessionStateOnly(); + Arrays.fill(fmt, version_.getBthColumnLength()); + final int tailleDeLigne = fmt[0] * fmt.length; + // Tant que l'index du point a modifier est inferieur au nb total. + while (index < l) { + + // Lecture de la ligne + bthIn_.readFields(fmt); + if (index == 0 && bthIn_.getLine().length() != tailleDeLigne) { + final int taille = bthIn_.getLine().length(); + if (taille % fmt.length == 0) { + final int tailleCol = taille / fmt.length; + analyze_.addWarn("BTH " + EfIOResource.getS("Nouveau format:") + CtuluLibString.ESPACE + tailleCol, bthIn_ + .getLineNumber()); + Arrays.fill(fmt, tailleCol); + bthIn_.analyzeCurrentLine(fmt); + + } + + } + // pour chaque cote, on initialise le point correspondant. + for (int i = 0; i < pointParLigne; i++) { + _maillage.setZIntern(index++, bthIn_.doubleField(i)); + // Si la limite est atteinte ... + if (index >= l) { + break; + } + } + // maj de l'avancement + up.majAvancement(); + } + } catch (final EOFException e) { + if (CtuluLibMessage.DEBUG) { + CtuluLibMessage.debug("Reading end"); + } + } catch (final NumberFormatException fe) { + analyze_.manageException(fe, bthIn_.getLineNumber()); + return; + } + // verifie si toutes les cotes sont bien initialisees. + if (index < l) { + // Ajout d'un avertissement. + analyze_.addWarn(EfIOResource.getS( + "La bathym\xE9trie des derniers points n'a pas \xE9t\xE9 initialis\xE9e (nb pt initialis\xE9s {0})", CtuluLibString + .getString(index)), bthIn_.getLineNumber()); + } + } + + /** + * @return le format + */ + public FileFormat getFileFormat() { + return getCorEleBthFileFormat(); + } + + /** + * @return le format + */ + public CorEleBthFileFormat getCorEleBthFileFormat() { + return (CorEleBthFileFormat) version_.getFileFormat(); + } + + protected Object internalRead() { + return readCorEleBth(); + } + + protected FortranInterface getFortranInterface() { + return new FortranInterface() { + + public void close() throws IOException { + if (corIn_ != null) { + corIn_.close(); + corIn_ = null; + } + if (eleIn_ != null) { + eleIn_.close(); + eleIn_ = null; + } + if (bthIn_ != null) { + bthIn_.close(); + bthIn_ = null; + } + } + }; + } + + /** + * @return la version + */ + public FileFormatVersionInterface getVersion() { + return version_; + } +} \ No newline at end of file Added: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthWriter.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthWriter.java (rev 0) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/corelebth/CorEleBthWriter.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -0,0 +1,384 @@ +/** + * @creation 2003-03-12 + * @modification $Date: 2006-09-19 14:45:47 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.io.corelebth; + +import java.io.File; +import java.io.IOException; +import java.io.Writer; + +import com.memoire.fu.FuLog; + +import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.ctulu.CtuluIOOperationSynthese; +import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.ProgressionUpdater; +import org.fudaa.ctulu.fileformat.FileFormat; +import org.fudaa.ctulu.fileformat.FileFormatVersionInterface; +import org.fudaa.ctulu.fileformat.FileOperationAbstract; +import org.fudaa.ctulu.fileformat.FileWriteOperationAbstract; +import org.fudaa.ctulu.fileformat.FortranInterface; +import org.fudaa.dodico.commun.DodicoLib; +import org.fudaa.dodico.ef.EfElement; +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.io.EfIOResource; +import org.fudaa.dodico.fortran.FortranWriter; + +/** + * @author deniger + * @version $Id: CorEleBthWriter.java,v 1.28 2006-09-19 14:45:47 deniger Exp $ + */ +public class CorEleBthWriter extends FileWriteOperationAbstract { + + private final int df_; + private final int sf_; + private final CorEleBthFileFormat version_; + FortranWriter bthOut_; + FortranWriter corOut_; + FortranWriter eleOut_; + /** + * True si la premiere colonne est cod\xE9e sur 5 caracateres. + */ + boolean simpleColumn_; + + protected String lineSep_; + + /** + * @param _f la version a utiliser + */ + public CorEleBthWriter(final CorEleBthFileFormat _f) { + lineSep_ = CtuluLibString.LINE_SEP; + version_ = _f; + sf_ = version_.getSimpleColumLength(); + df_ = version_.getDoubleColumLength(); + } + + private void setOut(final Writer _cor, final Writer _ele, final Writer _bth) { + corOut_ = _cor == null ? null : new FortranWriter(_cor); + eleOut_ = _ele == null ? null : new FortranWriter(_ele); + bthOut_ = _bth == null ? null : new FortranWriter(_bth); + } + + /** + * @return <code>true</code> si la premiere colonne est cod\xE9e sur 5 caracateres. + */ + public boolean isSimpleColumn() { + return simpleColumn_; + } + + public void setSimpleColumn(final boolean _simpleColumn) { + simpleColumn_ = _simpleColumn; + } + + protected FortranInterface getFortranInterface() { + return new FortranInterface() { + + public void close() throws IOException { + if (corOut_ != null) { + corOut_.close(); + corOut_ = null; + } + if (eleOut_ != null) { + eleOut_.close(); + eleOut_ = null; + } + if (bthOut_ != null) { + bthOut_.close(); + bthOut_ = null; + } + } + }; + } + + /** + * + */ + protected void internalWrite(final Object _o) { + if (_o instanceof CorEleBthInterface) { + writeCorEleBth((CorEleBthInterface) _o); + } else { + donneesInvalides(_o); + } + } + + /** + * @return le format. + */ + public FileFormat getFileFormat() { + return version_.getFileFormat(); + } + + /** + * Renvoie le separateur de ligne. + * + * @return separateur de ligne + */ + public final String getLineSeparator() { + return lineSep_; + } + + /** + * @return la version utilisee. + */ + public FileFormatVersionInterface getVersion() { + return version_; + } + + public final void setFile(final File _f) { + setFile(version_.getFileFormat().getFile(_f)); + } + + /** + * Aucun test sur les extension. + * + * @param _cor fichier cor cible + * @param _ele fichier ele cible + * @param _bth fichier bth cible + */ + public final void setFile(final File _cor, final File _ele, final File _bth) { + analyze_ = new CtuluAnalyze(); + analyze_.setResource(_cor.getAbsolutePath()); + setOut(FileOperationAbstract.initFileWriter(_cor), FileOperationAbstract.initFileWriter(_ele), + FileOperationAbstract.initFileWriter(_bth)); + } + + /** + * Aucun test sur les extension. + * + * @param _f cor,ele,bth + */ + public final void setFile(final File[] _f) { + setFile(_f[0], _f[1], _f[2]); + } + + /** + * Modifie le separateur de ligne. + * + * @param _lineSep The lineSep to set + */ + public final void setLineSeparator(final String _lineSep) { + lineSep_ = _lineSep; + } + + /** + * @param _o la source a ecrire + * @return la synthese + */ + public final CtuluIOOperationSynthese write(final CorEleBthInterface _o) { + writeCorEleBth(_o); + return closeOperation(_o); + } + + /** + * @param _percBegin le pourcentage de debut + * @param _percLength le longueur de la plage pourcentage + * @param _maillage le maillge + * @throws IOException io + */ + public void writeBth(final int _percBegin, final int _percLength, final EfGridInterface _maillage) throws IOException { + final int pointParLigne = version_.getBthPointByLine(); + if (bthOut_ == null) { + analyze_.addFatalError(EfIOResource.getS("Le flux pour la bathym\xE9trie est nul")); + return; + } + bthOut_.setLineSeparator(getLineSeparator()); + bthOut_.setStringQuoted(false); + // le format des lignes. + final int[] fmt = new int[pointParLigne]; + for (int i = pointParLigne - 1; i >= 0; i--) { + fmt[i] = version_.getBthColumnLength(); + } + // les points concernes + // H2dPoint[] pts= _maillage.getPts(); + final int l = _maillage.getPtsNb(); + // gestion de l'avancement + final int nbLigne = l / pointParLigne; + int index = 0; + final ProgressionUpdater up = new ProgressionUpdater(progress_); + up.setValue(nbLigne, 4, _percBegin, _percLength); + up.majProgessionStateOnly(); + for (int numLigne = 0; numLigne < nbLigne; numLigne++) { + for (int j = pointParLigne - 1; j >= 0; j--) { + bthOut_.doubleField(j, _maillage.getPtZ(index + j)); + } + index += pointParLigne; + bthOut_.writeFields(fmt); + // maj de l'avancement + up.majAvancement(); + } + final int coteRestante = l - nbLigne * pointParLigne; + if (index != l - coteRestante) { + FuLog.error("prob in cote restante"); + } + if (coteRestante > 0) { + for (int j = coteRestante - 1; j >= 0; j--) { + bthOut_.doubleField(j, _maillage.getPtZ(index + j)); + } + bthOut_.writeFields(fmt); + } + bthOut_.flush(); + } + + /** + * @param _percBegin pourcentage de debut + * @param _percLength longueur de la plage avancement + * @param _format le format + * @param _maillage le maillage soure + * @throws IOException + */ + public void writeCor(final int _percBegin, final int _percLength, final int _format, final EfGridInterface _maillage) + throws IOException { + if (corOut_ == null) { + analyze_.addFatalError(EfIOResource.getS("Le flux de coordonn\xE9es est nul")); + return; + } + corOut_.setLineSeparator(getLineSeparator()); + corOut_.setStringQuoted(false); + // H2dPoint[] pts= _maillage.getPts(); + final int nbPt = _maillage.getPtsNb(); + int[] fmt = new int[] { _format, sf_, sf_, df_, df_, df_ }; + // on fixe le dernier element + corOut_.doubleField(5, 1D); + corOut_.intField(0, nbPt); + corOut_.intField(1, 2); + corOut_.intField(2, 3); + corOut_.doubleField(3, 1D); + corOut_.doubleField(4, 1D); + corOut_.writeFields(fmt); + final ProgressionUpdater up = new ProgressionUpdater(progress_); + up.setValue(nbPt, 4, _percBegin, _percLength); + up.majProgessionStateOnly(); + fmt = new int[] { _format, df_, df_ }; + for (int i = 0; i < nbPt; i++) { + corOut_.doubleField(2, _maillage.getPtY(i)); + corOut_.intField(0, i + 1); + corOut_.doubleField(1, _maillage.getPtX(i)); + corOut_.writeFields(fmt); + // maj de l'avancement + up.majAvancement(); + } + corOut_.flush(); + } + + /** + * @param _inter la source a ecrire + */ + public void writeCorEleBth(final CorEleBthInterface _inter) { + final CorEleBthInterface source = _inter; + if (source == null) { + analyze_.addFatalError(DodicoLib.getS("Les donn\xE9es sont nulles")); + return; + } + final EfGridInterface maillage = source.getGrid(); + int format = version_.getDoubleColumLength(); + if (simpleColumn_) { + format = format / 2; + } + + // Si le nombre de points ne tiend pas dans le format simple + // on suppose que nbElments<NbPoints ... + final int l = maillage.getPtsNb(); + final int nbDigits = String.valueOf(l).length(); + // if (nbDigits > CorEleBthInterface.COLUMN_SIMPLE_LENGTH) + // on ecrit toujours dans le format double.a voir + if (nbDigits > version_.getDoubleColumLength()) { + analyze_.addError(EfIOResource.getS("Le nombre de points est trop important"), 0); + return; + } + final boolean afficheAvance = (progress_ == null ? false : true); + if (afficheAvance) { + progress_.setDesc(EfIOResource.getS("Ecriture fichiers cor,ele et bth")); + } + // pour le pourcentage d'avancement on suppose que la lecture + // des points prend 40% du temps. + int percBegin = 0; + int percLength = 40; + try { + writeCor(percBegin, percLength, format, maillage); + } catch (final IOException _io) { + analyze_.manageException(_io); + return; + } + // pour le pourcentage d'avancement on suppose que la lecture + // des elements prend 40% du temps et part de 40. + percBegin += percLength; + try { + writeEle(percBegin, percLength, format, maillage); + } catch (final IOException _io) { + analyze_.manageException(_io); + return; + } + percBegin += percLength; + percLength = 20; + try { + writeBth(percBegin, percLength, maillage); + } catch (final IOException _io) { + analyze_.manageException(_io); + return; + } + } + + /** + * @param _percBegin pourcentage debut + * @param _percLength etendu pourcentage + * @param _format le fomat + * @param _maillage le maillage + * @throws IOException io + */ + public void writeEle(final int _percBegin, final int _percLength, final int _format, final EfGridInterface _maillage) + throws IOException { + if (eleOut_ == null) { + analyze_.addFatalError(EfIOResource.getS("Le flux pour les \xE9l\xE9ments est nul")); + return; + } + eleOut_.setLineSeparator(getLineSeparator()); + eleOut_.setStringQuoted(false); + // H2dElement[] ele= _maillage.getElts(); + final int l = _maillage.getEltNb(); + // dans le cas double ?? + int[] fmt = new int[] { _format, sf_, sf_, sf_, sf_ }; + // utilite de ces 3 champs ? + eleOut_.intField(4, 0); + eleOut_.intField(3, 0); + eleOut_.intField(2, 0); + eleOut_.intField(1, _maillage.getEltType().getNbPt()); + eleOut_.intField(0, l); + eleOut_.writeFields(fmt); + fmt = new int[] { _format, // le num + version_.getEleSecondColumnLength(), // ? + _format, // ele 1 + _format, // ele 2 + _format, // ele 3 + _format, // ele 4 + _format, // ele 5 + _format, // ele 6 + _format // le 0 final + }; + // Gestion de l'avancement + final ProgressionUpdater up = new ProgressionUpdater(progress_); + up.setValue(l, 4, _percBegin, _percLength); + up.majProgessionStateOnly(); + EfElement elei; + int taille; + for (int i = 0; i < l; i++) { + elei = _maillage.getElement(i); + taille = elei.getPtNb(); + // le 0 final. + eleOut_.intField(2 + taille, 0); + eleOut_.intField(0, i + 1); + eleOut_.stringField(1, " -1"); + for (int j = 0; j < taille; j++) { + // les indexs de elei commencent a 0 ! + eleOut_.intField(2 + j, elei.getPtIndex(j) + 1); + } + eleOut_.writeFields(fmt); + // maj de l'avancement + up.majAvancement(); + } + eleOut_.flush(); + } +} \ No newline at end of file Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesAdapter.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesAdapter.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesAdapter.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -5,7 +5,7 @@ * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ -package org.fudaa.dodico.dunes.io; +package org.fudaa.dodico.ef.io.dunes; import org.fudaa.ctulu.fileformat.FileFormat; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesGEOFileFormat.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesGEOFileFormat.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesGEOFileFormat.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -5,7 +5,7 @@ * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ -package org.fudaa.dodico.dunes.io; +package org.fudaa.dodico.ef.io.dunes; import java.io.File; @@ -17,7 +17,6 @@ import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.fichiers.FileFormatSoftware; -import org.fudaa.dodico.h2d.type.H2dFileFormatType; /** * Un format pour les fichiers de modelisation geometriques Dunes. Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesGEOWriter.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesGEOWriter.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesGEOWriter.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -5,27 +5,27 @@ * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ -package org.fudaa.dodico.dunes.io; +package org.fudaa.dodico.ef.io.dunes; import java.io.IOException; import java.util.ArrayList; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.CoordinateSequence; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.Point; + import org.fudaa.ctulu.CtuluActivity; import org.fudaa.ctulu.ProgressionUpdater; import org.fudaa.ctulu.fileformat.FileFormatVersionInterface; import org.fudaa.ctulu.gis.GISDataModel; import org.fudaa.ctulu.gis.GISDataModelPointMultiPointAdapter; import org.fudaa.ctulu.gis.GISMultiPoint; +import org.fudaa.dodico.ef.io.EfIOResource; import org.fudaa.dodico.fortran.FileOpWriterCharSimpleAbstract; import org.fudaa.dodico.fortran.FortranWriter; -import org.fudaa.dodico.h2d.resource.H2dResource; -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.CoordinateSequence; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.Point; - /** * Une classe pour ecrire des fichiers Dunes de mod\xE9lisation (.geo) * @version $Id: SinusxWriter.java,v 1.24 2007/05/04 13:47:27 deniger Exp $ @@ -62,10 +62,7 @@ } GISDataModel[] mdls=(GISDataModel[])_o; - if (mdls == null) { - analyze_.addFatalError(H2dResource.getS("Les donn\xE9es sont nulles")); - return; - } + final ProgressionUpdater up = new ProgressionUpdater(progress_); if (progress_ != null) { @@ -82,7 +79,7 @@ // Recuperation des coordonn\xE9es : d'abord les lignes... GISDataModel[] mdlligs=filtreModels(mdls,1); if (mdlligs.length==0) { - analyze_.addFatalError(H2dResource.getS("Aucune ligne trouv\xE9e")); + analyze_.addFatalError(EfIOResource.getS("Aucune ligne trouv\xE9e")); return; } Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesInterface.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesInterface.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesInterface.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -5,7 +5,7 @@ * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ -package org.fudaa.dodico.dunes.io; +package org.fudaa.dodico.ef.io.dunes; import org.fudaa.dodico.ef.EfGridSource; Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesMAIFileFormat.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesMAIFileFormat.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesMAIFileFormat.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -4,7 +4,7 @@ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne */ -package org.fudaa.dodico.dunes.io; +package org.fudaa.dodico.ef.io.dunes; import java.io.File; @@ -13,13 +13,11 @@ import org.fudaa.ctulu.fileformat.FileFormatUnique; import org.fudaa.ctulu.fileformat.FileReadOperationAbstract; import org.fudaa.ctulu.fileformat.FileWriteOperationAbstract; - import org.fudaa.dodico.ef.EfGridInterface; import org.fudaa.dodico.ef.EfGridSource; import org.fudaa.dodico.ef.FileFormatGridVersion; +import org.fudaa.dodico.ef.io.EfIOResource; import org.fudaa.dodico.fichiers.FileFormatSoftware; -import org.fudaa.dodico.h2d.resource.H2dResource; -import org.fudaa.dodico.h2d.type.H2dFileFormatType; /** * @author deniger @@ -41,9 +39,8 @@ extensions_ = new String[] { "mail", "dunes" }; id_ = "DUNES"; nom_ = "Dunes maillage"; - description_ = H2dResource.getS("utilis\xE9 par le mailleur Dunes"); + description_ = EfIOResource.getS("utilis\xE9 par le mailleur Dunes"); software_ = FileFormatSoftware.REFLUX_IS; - type_ = H2dFileFormatType.MAILLAGE; } public boolean containsGrid() { Modified: trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesMAIReader.java =================================================================== --- trunk/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesMAIReader.java 2009-07-15 13:42:25 UTC (rev 4909) +++ trunk/fudaa_devel/dodico/src/org/fudaa/dodico/ef/io/dunes/DunesMAIReader.java 2009-10-13 21:37:28 UTC (rev 5256) @@ -5,7 +5,7 @@ * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ -package org.fudaa.dodico.dunes.io; +package org.fudaa.dodico.ef.io.dunes; import java.io.EOFException; import java.io.IOException; @@ -15,17 +15,16 @@ import org.fudaa.ctulu.ProgressionUpdater; import org.fudaa.ctulu.fileformat.FileFormat; import org.fudaa.ctulu.fileformat.FileFormatVersionInterface; - import org.fudaa.dodico.ef.EfElement; import org.fudaa.dodico.ef.EfLib; import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.ef.impl.EfGrid; +import org.fudaa.dodico.ef.io.EfIOResource; import org.fudaa.dodico.fortran.FileOpReadCharSimpleAbstract; -import org.fudaa.dodico.h2d.resource.H2dResource; /** * Lecteur de fichiers dunes (.mail). - * + * * @author deniger * @version $Id: DunesReader.java,v 1.28 2007-01-19 13:07:22 deniger Exp $ */ @@ -62,27 +61,27 @@ for (int i = 0; i < nbElem; i++) { in_.readFields(); if (in_.getNumberOfFields() < 2) { - analyze_.addInfo(H2dResource.getS("Format attendu") + "NUM_ELEMENT NB_POINT P[1] ...P[NB_POINT]", in_ + analyze_.addInfo(EfIOResource.getS("Format attendu") + "NUM_ELEMENT NB_POINT P[1] ...P[NB_POINT]", in_ .getLineNumber()); - analyze_.addError(H2dResource.getS("La d\xE9finition de l'\xE9l\xE9ment {0} n'est pas valide"), in_.getLineNumber()); + analyze_.addError(EfIOResource.getS("La d\xE9finition de l'\xE9l\xE9ment {0} n'est pas valide"), in_.getLineNumber()); return null; } // le numero d'element int temp = in_.intField(0); if (temp != (i + 1)) { - analyze_ - .addInfo(H2dResource.getS("L'index de l'\xE9l\xE9ment ne correspond pas \xE0 l'index r\xE9el"), in_.getLineNumber()); + analyze_.addInfo(EfIOResource.getS("L'index de l'\xE9l\xE9ment ne correspond pas \xE0 l'index r\xE9el"), in_ + .getLineNumber()); } temp = in_.intField(1); if (temp <= 0) { - analyze_.addError(H2dResource.getS("Le nombre de points est n\xE9gatif ou nul pour l'\xE9l\xE9ment d'indice {0}", + analyze_.addError(EfIOResource.getS("Le nombre de points est n\xE9gatif ou nul pour l'\xE9l\xE9ment d'indice {0}", CtuluLibString.getString(i + 1)), in_.getLineNumber()); return null; } if (in_.getNumberOfFields() != (temp + 2)) { - analyze_.addInfo(H2dResource.getS("Nombre indiqu\xE9") + ": " + temp + CtuluLibString.DOT + H2dResource.getS("Nombre lu") + ": " - + (in_.getNumberOfFields() - 2), in_.getLineNumber()); - analyze_.addFatalError(H2dResource.getS("Le nombre d'\xE9l\xE9ments est incorrect"), in_.getLineNumber()); + analyze_.addInfo(EfIOResource.getS("Nombre indiqu\xE9") + ": " + temp + CtuluLibString.DOT + + EfIOResource.getS("Nombre lu") + ": " + (in_.getNumberOfFields() - 2), in_.getLineNumber()); + analyze_.addFatalError(EfIOResource.getS("Le nombre d'\xE9l\xE9ments est incorrect"), in_.getLineNumber()); return null; } index = new int[temp]; @@ -96,7 +95,8 @@ return elems; } - private EfNode[] readNodes(final int _nbNoeuds, final ProgressionUpdater _up, final double[] _adaptatifs) throws IOException { + private EfNode[] readNodes(final int _nbNoeuds, final ProgressionUpdater _up, final double[] _adaptatifs) + throws IOException { final EfNode[] points = new EfNode[_nbNoeuds]; _up.setValue(2, _nbNoeuds, 0, 50); _up.majProgessionStateOnly(); @@ -105,20 +105,20 @@ for (int i = 0; i < _nbNoeuds; i++) { in_.readFields(); if (in_.getNumberOfFields() != 4) { - analyze_.addInfo(H2dResource.getS("Format attendu") + ": NUM_POINT X Y Z", in_.getLineNumber()); - analyze_.addError(H2dResource.getS("La d\xE9finition du noeud {0} n'est p... [truncated message content] |
From: <de...@us...> - 2009-10-15 04:09:55
|
Revision: 5275 http://fudaa.svn.sourceforge.net/fudaa/?rev=5275&view=rev Author: deniger Date: 2009-10-15 04:09:46 +0000 (Thu, 15 Oct 2009) Log Message: ----------- Added Paths: ----------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BControleVisible.java Removed Paths: ------------- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleVisible.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeCoordinate.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvLineChooser.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileAction.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbe.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeGroup.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeInterface.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeModelInterface.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeTime.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFillePanel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateFille.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateVolumeBuilder.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileGridPalette.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileLayerModelForCourbe.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTarget.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeFille.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModelPersist.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvVolumeAction.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvVolumePanel.java Copied: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BControleVisible.java (from rev 4909, trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleVisible.java) =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BControleVisible.java (rev 0) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/controle/BControleVisible.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -0,0 +1,79 @@ +/* + * @creation 9 ao\xFBt 2004 + * @modification $Date: 2006-09-19 14:55:53 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.ebli.controle; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +import javax.swing.JComponent; +import javax.swing.JPanel; + +import com.memoire.bu.BuCheckBox; +import com.memoire.bu.BuGridLayout; +import com.memoire.bu.BuLabel; +import com.memoire.bu.BuResource; + +/** + * Une checkbox pour controler l'affichage d'un composant. Ce composant recoit les changements de proprietes ("visible") + * pour se mettre a jour. Une reference est gardee vers le composant cible. + * + * @author Fred Deniger + * @version $Id: BControleVisible.java,v 1.7 2006-09-19 14:55:53 deniger Exp $ + */ +public class BControleVisible extends BuCheckBox implements PropertyChangeListener, ActionListener { + + private JComponent target_; + + public BControleVisible() { + super(); + addActionListener(this); + } + + public void setTarget(final JComponent _c) { + if (_c != target_) { + if (target_ != null) { + target_.removePropertyChangeListener(this); + } + target_ = _c; + if (target_ != null) { + setSelected(target_.isVisible()); + target_.addPropertyChangeListener("visible", this); + } + } + setEnabled(target_ != null); + } + + public void actionPerformed(final ActionEvent _e) { + if (target_ != null) { + target_.setVisible(isSelected()); + } + } + + public void propertyChange(final PropertyChangeEvent _evt) { + if (_evt.getSource() == target_) { + setSelected(target_.isVisible()); + } + + } + + /** + * Panneau permettant de controler l'etat de visibilite d'un composant. + * + * @return un panel avec un label et une checkbox. + */ + public static BControleVisible buildPanelVisible(final JPanel _dest) { + _dest.removeAll(); + _dest.setLayout(new BuGridLayout(2)); + _dest.add(new BuLabel(BuResource.BU.getString("Visible"))); + final BControleVisible r = new BControleVisible(); + _dest.add(r); + return r; + } +} \ No newline at end of file Deleted: trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleVisible.java =================================================================== --- trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleVisible.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/ebli/src/org/fudaa/ebli/volume/controles/BControleVisible.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,79 +0,0 @@ -/* - * @creation 9 ao\xFBt 2004 - * @modification $Date: 2006-09-19 14:55:53 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.ebli.volume.controles; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; - -import javax.swing.JComponent; -import javax.swing.JPanel; - -import com.memoire.bu.BuCheckBox; -import com.memoire.bu.BuGridLayout; -import com.memoire.bu.BuLabel; -import com.memoire.bu.BuResource; - -/** - * Une checkbox pour controler l'affichage d'un composant. Ce composant recoit les changements de proprietes ("visible") - * pour se mettre a jour. Une reference est gardee vers le composant cible. - * - * @author Fred Deniger - * @version $Id: BControleVisible.java,v 1.7 2006-09-19 14:55:53 deniger Exp $ - */ -public class BControleVisible extends BuCheckBox implements PropertyChangeListener, ActionListener { - - private JComponent target_; - - public BControleVisible() { - super(); - addActionListener(this); - } - - public void setTarget(final JComponent _c) { - if (_c != target_) { - if (target_ != null) { - target_.removePropertyChangeListener(this); - } - target_ = _c; - if (target_ != null) { - setSelected(target_.isVisible()); - target_.addPropertyChangeListener("visible", this); - } - } - setEnabled(target_ != null); - } - - public void actionPerformed(final ActionEvent _e) { - if (target_ != null) { - target_.setVisible(isSelected()); - } - } - - public void propertyChange(final PropertyChangeEvent _evt) { - if (_evt.getSource() == target_) { - setSelected(target_.isVisible()); - } - - } - - /** - * Panneau permettant de controler l'etat de visibilite d'un composant. - * - * @return un panel avec un label et une checkbox. - */ - public static BControleVisible buildPanelVisible(final JPanel _dest) { - _dest.removeAll(); - _dest.setLayout(new BuGridLayout(2)); - _dest.add(new BuLabel(BuResource.BU.getString("Visible"))); - final BControleVisible r = new BControleVisible(); - _dest.add(r); - return r; - } -} \ No newline at end of file Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeCoordinate.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeCoordinate.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeCoordinate.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,27 +0,0 @@ -/* - * @creation 30 nov. 06 - * @modification $Date: 2007-02-02 11:22:13 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import org.fudaa.ebli.courbe.EGCourbeChild; -import org.fudaa.ebli.courbe.EGGroup; - -/** - * @author fred deniger - * @version $Id: MVProfileCourbeCoordinate.java,v 1.2 2007-02-02 11:22:13 deniger Exp $ - */ -public class MVProfileCourbeCoordinate extends EGCourbeChild implements MvProfileCourbeInterface { - - public MVProfileCourbeCoordinate(final EGGroup _m, final MvProfileCoordinatesModel _model) { - super(_m, _model); - } - - public MvProfileCourbeModelInterface getProfileModel() { - return (MvProfileCourbeModelInterface) getModel(); - } - -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvLineChooser.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvLineChooser.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvLineChooser.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,176 +0,0 @@ -/** - * Licence GPL - * Copyright Genesis - */ -package org.fudaa.fudaa.meshviewer.profile; - -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.util.Observable; - -import javax.swing.ButtonGroup; -import javax.swing.JComponent; -import javax.swing.JTree; -import javax.swing.event.TreeSelectionEvent; -import javax.swing.event.TreeSelectionListener; - -import com.memoire.bu.BuBorders; -import com.memoire.bu.BuLabel; -import com.memoire.bu.BuPanel; -import com.memoire.bu.BuRadioButton; -import com.memoire.bu.BuScrollPane; -import com.memoire.bu.BuVerticalLayout; -import com.vividsolutions.jts.geom.LineString; - -import org.fudaa.ctulu.gis.GISLib; -import org.fudaa.ebli.calque.CalqueGISTreeModel; -import org.fudaa.ebli.calque.ZCalqueLigneBrisee; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.ebli.commun.EbliLib; -import org.fudaa.fudaa.meshviewer.MvResource; -import org.fudaa.fudaa.sig.layer.FSigTempLineInLayer; - -/** - * @author deniger - */ -public class MvLineChooser extends Observable { - - public BuRadioButton btSelectedLine_; - - public BuRadioButton btSelectInTree_; - - public final ZEbliCalquesPanel calque_; - - public final LineString initSelected_; - final CalqueGISTreeModel lineTreeModel_; - - BuPanel panelTreeIsoLignes; - final FSigTempLineInLayer tmpLine_; - public JTree tree_; - - public MvLineChooser(LineString _initSelected, ZEbliCalquesPanel _calque) { - super(); - initSelected_ = _initSelected; - calque_ = _calque; - lineTreeModel_ = new CalqueGISTreeModel(null, _calque.getDonneesCalque()); - lineTreeModel_.setMask(GISLib.MASK_POLYLINE|GISLib.MASK_POLYGONE); - tmpLine_ = new FSigTempLineInLayer(_calque); - } - - protected JTree buildTree() { - return lineTreeModel_.createView(true,false); - } - - public void close() { - tmpLine_.close(); - } - - public String getError() { - if (tree_.isEnabled() && tree_.isSelectionEmpty()) { return EbliLib.getS("S\xE9lectionner au moins une courbe"); } - return null; - } - - /** - * @return the initSelected - */ - public LineString getInitSelected() { - return initSelected_; - } - - public LineString getSelectedLine() { - if (btSelectedLine_.isSelected()) { - return initSelected_; - // MvProfileBuilderFromTree.this.name_ = EbliLib.getS("S\xE9lection"); - } else { - return getSelectedLineInTree(tree_); - // MvProfileBuilderFromTree.this.name_ = getSelectedLineTitle(tree_); - } - } - - public String getSelectedLineName() { - if (btSelectedLine_.isSelected()) { - return EbliLib.getS("S\xE9lection"); - } else { - return getSelectedLineTitle(tree_); - } - } - - public JComponent getPanel(String title) { - if (panelTreeIsoLignes != null) return panelTreeIsoLignes; - panelTreeIsoLignes = new BuPanel(new BuVerticalLayout(3)); - tree_ = buildTree(); - panelTreeIsoLignes.add(new BuLabel(title)); - btSelectedLine_ = new BuRadioButton(MvResource.getS("Utiliser La ligne s\xE9lectionn\xE9e")); - btSelectInTree_ = new BuRadioButton(MvResource.getS("Utiliser une ligne disponible:")); - final ButtonGroup bg = new ButtonGroup(); - bg.add(btSelectedLine_); - bg.add(btSelectInTree_); - final BuScrollPane buScrollPane = new BuScrollPane(tree_); - buScrollPane.setPreferredHeight(200); - panelTreeIsoLignes.add(btSelectedLine_); - panelTreeIsoLignes.add(btSelectInTree_); - buScrollPane.setBorder(BuBorders.EMPTY2500); - panelTreeIsoLignes.add(buScrollPane); - if (initSelected_ == null) { - btSelectedLine_.setEnabled(false); - btSelectInTree_.setSelected(true); - } else { - btSelectedLine_.setSelected(true); - tree_.setEnabled(false); - this.update(initSelected_, false); - } - tree_.addTreeSelectionListener(new TreeSelectionListener() { - public void valueChanged(final TreeSelectionEvent _e) { - // updateError(pn, tree_, varTime_); - update(getSelectedLineInTree(tree_), true); - } - - }); - // le selectionneur pour le bouton - btSelectedLine_.addItemListener(new ItemListener() { - public void itemStateChanged(final ItemEvent _e) { - tree_.setEnabled(!btSelectedLine_.isSelected()); - if (btSelectedLine_.isSelected()) { - update(initSelected_, tmpLine_.isZoomChanged()); - } else if (tree_.isSelectionEmpty()) { - update(null, false); - } else { - update(getSelectedLineInTree(tree_), true); - } - // updateError(pn, tree_, varTime_); - } - - }); - return panelTreeIsoLignes; - } - - public LineString getSelectedLineInTree(final JTree _tree) { - if (_tree.isSelectionEmpty()) { return null; } - final CalqueGISTreeModel.LayerNode node = (CalqueGISTreeModel.LayerNode) _tree.getSelectionPath() - .getLastPathComponent(); - final ZCalqueLigneBrisee cq = (ZCalqueLigneBrisee) node.getUserObject(); - return (LineString) cq.getModele().getGeomData().getGeometry(node.getIdxGeom()); - } - - public String getSelectedLineTitle(final JTree _tree) { - if (_tree.isSelectionEmpty()) { return null; } - final CalqueGISTreeModel.LayerNode node = (CalqueGISTreeModel.LayerNode) _tree.getSelectionPath() - .getLastPathComponent(); - return node.toString(); - } - - public void update(final LineString _s, final boolean _zoom) { - tmpLine_.display(_s, _zoom); - setChanged(); - super.notifyObservers(_s); - } - - public void zoomInitial() { - tmpLine_.zoomInitial(); - } - - public void restaurer() { - tmpLine_.restaurer(); - } - -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileAction.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileAction.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileAction.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,52 +0,0 @@ -/* - * @creation 22 nov. 06 - * @modification $Date: 2007-06-13 12: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.meshviewer.profile; - -import java.awt.event.ActionEvent; - -import com.vividsolutions.jts.geom.LineString; - -import org.fudaa.ebli.commun.EbliActionSimple; -import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; -import org.fudaa.fudaa.meshviewer.MvResource; -import org.fudaa.fudaa.meshviewer.layer.MvVisuPanel; - -/** - * @author fred deniger - * @version $Id: MvProfileAction.java,v 1.5 2007-06-13 12:58:09 deniger Exp $ - */ -public class MvProfileAction extends EbliActionSimple { - final MvProfileTarget src_; - final MvVisuPanel panel_; - final FudaaCommonImplementation ui_; - - public MvProfileAction(final MvProfileTarget _src, final FudaaCommonImplementation _ui, final MvVisuPanel _visu) { - super(MvResource.getS("Profils spatiaux"), MvResource.MV.getIcon("profile"), "SPATIAL_PROFILE"); - src_ = _src; - ui_ = _ui; - panel_ = _visu; - - } - - protected LineString getSelectedLine() { - //-- on tente de recuperer la ligne issue d'une creation geometrique --// - LineString ligneSelectionnee=panel_.getSelectedLine(); - //-- on essaie avec une ligne brisee formee par les sondes --// - if(ligneSelectionnee==null) - ligneSelectionnee=panel_.getSelectedLineFromSonde(); - return ligneSelectionnee; - } - - @Override - public void actionPerformed(final ActionEvent _e) { - - - new MvProfileBuilderFromTree(src_, ui_, getSelectedLine(), panel_, new MvProfileCoteTester()).start(); - } - -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilder.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,487 +0,0 @@ -/* - * @creation 21 nov. 06 - * @modification $Date: 2007-06-13 12:58:10 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import java.awt.Color; -import java.text.DecimalFormat; -import java.util.HashMap; -import java.util.Map; - -import javax.swing.ListModel; - -import com.memoire.bu.BuLib; -import com.vividsolutions.jts.geom.LineString; - -import org.fudaa.ctulu.CtuluActivity; -import org.fudaa.ctulu.CtuluLib; -import org.fudaa.ctulu.CtuluLibString; -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ctulu.gui.CtuluLibSwing; -import org.fudaa.dodico.commun.DodicoLib; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsCorrectionTester; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsBuilder; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsMng; -import org.fudaa.dodico.ef.operation.EfLineIntersectorActivity; -import org.fudaa.dodico.h2d.type.H2dVariableType; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.ebli.commun.EbliLib; -import org.fudaa.ebli.courbe.EGAxeVertical; -import org.fudaa.ebli.courbe.EGCourbeChild; -import org.fudaa.ebli.courbe.EGGroup; -import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeListModel; -import org.fudaa.fudaa.meshviewer.MvResource; -import org.fudaa.fudaa.meshviewer.export.MvExportChooseVarAndTime; - -/** - * @author fred deniger - * @version $Id: MvProfileBuilder.java,v 1.14 2007-06-13 12:58:10 deniger Exp $ - */ -public abstract class MvProfileBuilder implements CtuluActivity { - - public static int idx; - - public static String getProfileName(final String _name) { - return MvResource.getS("Profils spatiaux") - + (_name == null ? CtuluLibString.EMPTY_STRING : (CtuluLibString.ESPACE + _name)); - } - - final EfLineIntersectorActivity act_; - final MvProfileTarget data_; - // BuDesktop dest_; - public final ListModel initVar_; - // GrBoite initZoom_; - // boolean isZoomChanged_; - EfLineIntersectionsResultsMng meshesResults_; - - public String name_; - EfLineIntersectionsResultsMng nodesResults_; - - final ZEbliCalquesPanel panel_; - - public LineString selectedLine_; - - final FudaaCourbeTimeListModel timeModel_; - - final EfLineIntersectionsCorrectionTester tester_; - - // ZCalqueLigneBrisee tmp_; - - 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, - final EfLineIntersectionsCorrectionTester _tester, final LineString _selected) { - super(); - data_ = _data; - panel_ = _panel; - tester_ = _tester; - - initVar_ = CtuluLibSwing.createListModel(data_.getVars()); - act_ = new EfLineIntersectorActivity(data_.getInterpolator()); - ui_ = panel_.getCtuluUI(); - timeModel_ = _data.getTimeModel(); - initLine_ = _selected; - } - - MvExportChooseVarAndTime createVarTimeChooser(final String _help) { - final MvExportChooseVarAndTime res = new MvExportChooseVarAndTime(initVar_, timeModel_, _help); - if (timeModel_ != null) { - final int i = timeModel_.getSize() - 1; - res.getTimeSelectionModel().setSelectionInterval(i, i); - } - return res; - } - - /** - * methode qui construit le nouveau graphe de profil spatial. - * - * @param _prog - * @param _selected - */ - public void actBuildGroup(final ProgressionInterface _prog, final MvExportChooseVarAndTime _selected) { - int[] time = _selected.getSelectedTimeStepIdx(); - final CtuluVariable[] vs = _selected.getSelectedVar(); - - final int nbVar = vs == null ? 0 : vs.length; - final boolean isTime = timeModel_ != null; - if (time == null) { - time = new int[] { 0 }; - } - boolean addXYForNode = false; - boolean addXYForMesh = false; - for (int i = initVar_.getSize() - 1; i >= 0; i--) { - if (data_.getData().isElementVar((CtuluVariable) initVar_.getElementAt(i))) { - addXYForMesh = true; - } else { - addXYForNode = true; - } - // les 2 sont a true - if (addXYForMesh && addXYForNode) { - break; - } - } - final int nbTIme = time.length; - final MvProfileTreeModel tree = new MvProfileTreeModel(this.data_, tester_); - if (addXYForNode) { - tree.setNodesResults(getNodeResultsMng(_prog), getNodeResultBuilder(_prog)); - } - if (addXYForMesh) { - tree.setMeshesResults(getMeshResultsMng(_prog), getMeshesResultBuilder(_prog)); - - } - final EGGroup grCoord = new EGGroup(); - final String s = EbliLib.getS("Coordonn\xE9es"); - grCoord.setTitle(s); - final EGAxeVertical yCoordonnees = new EGAxeVertical(); - yCoordonnees.setTitre(s); - yCoordonnees.setUnite("m"); - grCoord.setAxeY(yCoordonnees); - final String sep = " - "; - if (addXYForNode) { - final EGCourbeChild courbeChild = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getNodeResultsMng(_prog).getDefaultRes(), true)); - final EGCourbeChild courbeChild2 = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getNodeResultsMng(_prog).getDefaultRes(), false)); - if (addXYForNode && addXYForMesh) { - courbeChild.setTitle(courbeChild.getTitle() + sep + MvResource.getS("Noeuds")); - courbeChild2.setTitle(courbeChild2.getTitle() + sep + MvResource.getS("Noeuds")); - } - grCoord.addEGComponent(courbeChild); - - grCoord.addEGComponent(courbeChild2); - - } - if (addXYForMesh) { - final EGCourbeChild courbeChild = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getMeshResultsMng(_prog).getDefaultRes(), true)); - final EGCourbeChild courbeChild2 = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getMeshResultsMng(_prog).getDefaultRes(), false)); - if (addXYForNode && addXYForMesh) { - courbeChild.setTitle(courbeChild.getTitle() + sep + MvResource.getS("Elements")); - courbeChild2.setTitle(courbeChild2.getTitle() + sep + MvResource.getS("Elements")); - } - grCoord.addEGComponent(courbeChild); - - grCoord.addEGComponent(courbeChild2); - - } - grCoord.setVisible(false); - tree.add(grCoord); - // map permettant de stocker la correspondance var -> groupe - final Map varGroup = new HashMap(); - if (vs != null) { - for (int i = 0; i < nbVar; i++) { - // pas null - final CtuluVariable var = vs[i]; - MvProfileCourbeGroup gri = null; - // dans ce cas, on va g\xE9rer les variables parents: inutile de creer des groupe different - // pour des variables de meme type - Color c = null; - boolean mustAddGr = true; - if (var instanceof H2dVariableType) { - H2dVariableType parent = ((H2dVariableType) var).getParentVariable(); - if (parent == null) { - parent = (H2dVariableType) var; - } - c = MvProfileFillePanel.getColorFor(i, parent); - gri = (MvProfileCourbeGroup) varGroup.get(parent); - if (gri == null) { - gri = MvProfileFillePanel.createGroupFor(parent); - varGroup.put(parent, gri); - } else { - mustAddGr = false; - } - } - if (gri == null) { - gri = MvProfileFillePanel.createGroupFor(var); - } - if (c == null) { - c = MvProfileFillePanel.getColorFor(i, var); - } - // on doit construire les courbes - for (int t = 0; t < nbTIme; t++) { - - EfLineIntersectionsResultsBuilder builder= getResBuilder(var, _prog); - if(selectedLine_!=null) - builder.setInitLine(selectedLine_); - else - builder.setInitLine(initLine_); - final MVProfileCourbeModel model = new MVProfileCourbeModel(var, data_.getData(), time[t],builder , _prog); - EGCourbeChild child; - if (isTime) { - String title = var.toString() + CtuluLibString.ESPACE; - if (var.getCommonUnit() != null) title += "(" + var.getCommonUnit() + ")" + CtuluLibString.ESPACE; - title += timeModel_.getElementAt(time[t]); - // -- on ajoute les extremites du segment choisi --// - title += ", P1(" + format(this.selectedLine_.getCoordinateN(0).x, 2) + ";" - + format(this.selectedLine_.getCoordinateN(0).y, 2) + ")" + sep + "P" - + this.selectedLine_.getNumPoints() + "(" - + format(this.selectedLine_.getCoordinateN(this.selectedLine_.getNumPoints() - 1).x, 2) + ";" - + format(this.selectedLine_.getCoordinateN(this.selectedLine_.getNumPoints() - 1).y, 2) + ")"; - - model.setTitle(title); - child = new MvProfileCourbeTime(gri, model, timeModel_); - } else { - child = new MvProfileCourbe(gri, model); - } - child.setAspectContour(c); - gri.addEGComponent(child); - } - if (mustAddGr) { - tree.add(gri); - } - } - } - - data_.profilPanelCreated(new MvProfileFillePanel(tree, ui_), _prog, name_); - - } - - public String format(double value, int nbChiffresSignificatifs) { - String forme = "#."; - for (int i = 0; i < nbChiffresSignificatifs; i++) - forme += "0"; - DecimalFormat df = new DecimalFormat(forme); - return df.format(value); - } - - /** - * Methode qui permet d ajouter une courbe spatiale poru un grapeh deja existant. - * - * @author Adrien Hadoux - * @param _prog - * @param _selected - */ - public MvProfileFillePanel actAddGroupForExistingModel(final ProgressionInterface _prog, - final MvExportChooseVarAndTime _selected) { - int[] time = _selected.getSelectedTimeStepIdx(); - final CtuluVariable[] vs = _selected.getSelectedVar(); - - final int nbVar = vs == null ? 0 : vs.length; - final boolean isTime = timeModel_ != null; - if (time == null) { - time = new int[] { 0 }; - } - boolean addXYForNode = false; - boolean addXYForMesh = false; - for (int i = initVar_.getSize() - 1; i >= 0; i--) { - if (data_.getData().isElementVar((CtuluVariable) initVar_.getElementAt(i))) { - addXYForMesh = true; - } else { - addXYForNode = true; - } - // les 2 sont a true - if (addXYForMesh && addXYForNode) { - break; - } - } - final int nbTIme = time.length; - final MvProfileTreeModel tree = new MvProfileTreeModel(this.data_, tester_); - if (addXYForNode) { - tree.setNodesResults(getNodeResultsMng(_prog), getNodeResultBuilder(_prog)); - } - if (addXYForMesh) { - tree.setMeshesResults(getMeshResultsMng(_prog), getMeshesResultBuilder(_prog)); - - } - final EGGroup grCoord = new EGGroup(); - final String s = EbliLib.getS("Coordonn\xE9es"); - grCoord.setTitle(s); - final EGAxeVertical yCoordonnees = new EGAxeVertical(); - yCoordonnees.setTitre(s); - yCoordonnees.setUnite("m"); - grCoord.setAxeY(yCoordonnees); - final String sep = " - "; - if (addXYForNode) { - final EGCourbeChild courbeChild = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getNodeResultsMng(_prog).getDefaultRes(), true)); - final EGCourbeChild courbeChild2 = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getNodeResultsMng(_prog).getDefaultRes(), false)); - if (addXYForNode && addXYForMesh) { - courbeChild.setTitle(courbeChild.getTitle() + sep + MvResource.getS("Noeuds")); - courbeChild2.setTitle(courbeChild2.getTitle() + sep + MvResource.getS("Noeuds")); - } - grCoord.addEGComponent(courbeChild); - - grCoord.addEGComponent(courbeChild2); - - } - if (addXYForMesh) { - final EGCourbeChild courbeChild = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getMeshResultsMng(_prog).getDefaultRes(), true)); - final EGCourbeChild courbeChild2 = new MVProfileCourbeCoordinate(grCoord, new MvProfileCoordinatesModel( - getMeshResultsMng(_prog).getDefaultRes(), false)); - if (addXYForNode && addXYForMesh) { - courbeChild.setTitle(courbeChild.getTitle() + sep + MvResource.getS("Elements")); - courbeChild2.setTitle(courbeChild2.getTitle() + sep + MvResource.getS("Elements")); - } - grCoord.addEGComponent(courbeChild); - - grCoord.addEGComponent(courbeChild2); - - } - grCoord.setVisible(false); - tree.add(grCoord); - // map permettant de stocker la correspondance var -> groupe - final Map varGroup = new HashMap(); - if (vs != null) { - for (int i = 0; i < nbVar; i++) { - // pas null - final CtuluVariable var = vs[i]; - MvProfileCourbeGroup gri = null; - // dans ce cas, on va g\xE9rer les variables parents: inutile de creer des groupe different - // pour des variables de meme type - Color c = null; - boolean mustAddGr = true; - if (var instanceof H2dVariableType) { - H2dVariableType parent = ((H2dVariableType) var).getParentVariable(); - if (parent == null) { - parent = (H2dVariableType) var; - } - c = MvProfileFillePanel.getColorFor(i, parent); - gri = (MvProfileCourbeGroup) varGroup.get(parent); - if (gri == null) { - gri = MvProfileFillePanel.createGroupFor(parent); - varGroup.put(parent, gri); - } else { - mustAddGr = false; - } - } - if (gri == null) { - gri = MvProfileFillePanel.createGroupFor(var); - } - if (c == null) { - c = MvProfileFillePanel.getColorFor(i, var); - } - // on doit construire les courbes - for (int t = 0; t < nbTIme; t++) { - final MVProfileCourbeModel model = new MVProfileCourbeModel(var, data_.getData(), time[t], getResBuilder(var, - _prog), _prog); - EGCourbeChild child; - if (isTime) { - model.setTitle(var.toString() + CtuluLibString.ESPACE + timeModel_.getElementAt(time[t])); - child = new MvProfileCourbeTime(gri, model, timeModel_); - } else { - child = new MvProfileCourbe(gri, model); - } - child.setAspectContour(c); - gri.addEGComponent(child); - } - if (mustAddGr) { - tree.add(gri); - } - } - } - - return new MvProfileFillePanel(tree, ui_); - - } - - public void close() {} - - protected String getHelpForVarTime() { - return timeModel_ == null ? CtuluLib.getS("S\xE9lectionner les variables") : CtuluLib - .getS("S\xE9lectionner les variables et les pas de temps"); - } - - protected EfLineIntersectionsResultsI getRes(final CtuluVariable _o, final int _tidx, final ProgressionInterface _prog) { - if (data_.getData().isElementVar(_o)) { return getMeshResults(_prog, _tidx); } - return getNodeResults(_prog, _tidx); - } - - protected EfLineIntersectionsResultsBuilder getResBuilder(final CtuluVariable _o, final ProgressionInterface _prog) { - if (data_.getData().isElementVar(_o)) { return getMeshesResultBuilder(_prog); } - return getNodeResultBuilder(_prog); - } - - public EfLineIntersectionsResultsI getDefaultRes(final CtuluVariable _o, final ProgressionInterface _prog) { - if (data_.getData().isElementVar(_o)) { return getMeshResultsMng(_prog).getDefaultRes(); } - return getNodeResultsMng(_prog).getDefaultRes(); - } - - public void showNoIntersectionFound() { - BuLib.invokeLater(new Runnable() { - - public void run() { - ui_.error(DodicoLib.getS("Aucune intersection trouv\xE9e")); - } - }); - } - - protected abstract void stepOne(); - - public EfLineIntersectionsResultsMng getMeshResultsMng(final ProgressionInterface _prog) { - if (meshesResults_ == null) { - meshesResults_ = act_.computeFor(selectedLine_, _prog, true); - } - return meshesResults_; - - } - - EfLineIntersectionsResultsBuilder meshesResultBuilder_; - EfLineIntersectionsResultsBuilder nodesResultBuilder_; - - public EfLineIntersectionsResultsI getMeshResults(final ProgressionInterface _prog, final int _tidx) { - getMeshesResultBuilder(_prog); - return meshesResultBuilder_.createResults(_tidx, _prog); - } - - public EfLineIntersectionsResultsBuilder getMeshesResultBuilder(final ProgressionInterface _prog) { - final EfLineIntersectionsResultsMng meshes = getMeshResultsMng(_prog); - - if (meshesResultBuilder_ == null) meshesResultBuilder_ = new EfLineIntersectionsResultsBuilder(initLine_, meshes - .getDefaultRes(), tester_); - return meshesResultBuilder_; - } - - public EfLineIntersectionsResultsI getNodeResults(final ProgressionInterface _prog, final int _tidx) { - getNodeResultBuilder(_prog); - return nodesResultBuilder_.createResults(_tidx, _prog); - } - - public EfLineIntersectionsResultsBuilder getNodeResultBuilder(final ProgressionInterface _prog) { - final EfLineIntersectionsResultsMng nodes = getNodeResultsMng(_prog); - if (nodesResultBuilder_ == null) nodesResultBuilder_ = new EfLineIntersectionsResultsBuilder(initLine_, nodes - .getDefaultRes(), tester_); - return nodesResultBuilder_; - } - - public EfLineIntersectionsResultsMng getNodeResultsMng(final ProgressionInterface _prog) { - if (nodesResults_ == null) { - nodesResults_ = act_.computeFor(selectedLine_, _prog, false); - } - return nodesResults_; - - } - - public ListModel getTimeModel() { - return timeModel_; - } - - public void start() { - if (initVar_.getSize() == 0) { - ui_.error(CtuluLib.getS("Il n'y a pas de variables \xE0 traiter")); - return; - } - stepOne(); - } - - public void stop() { - if (act_ != null) { - act_.stop(); - } - } - -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromLine.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,70 +0,0 @@ -/* - * @creation 13 juin 07 - * @modification $Date: 2007-06-13 12:58:11 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import com.vividsolutions.jts.geom.LineString; - -import org.fudaa.ctulu.CtuluTaskDelegate; -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ctulu.gui.CtuluLibSwing; -import org.fudaa.dodico.commun.DodicoLib; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsCorrectionTester; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.fudaa.commun.FudaaLib; -import org.fudaa.fudaa.meshviewer.MvResource; -import org.fudaa.fudaa.meshviewer.export.MvExportChooseVarAndTime; - -public class MvProfileBuilderFromLine extends MvProfileBuilder { - - - - public MvProfileBuilderFromLine(final MvProfileTarget _data, final CtuluUI _ui, final LineString _line, - final ZEbliCalquesPanel _panel, final EfLineIntersectionsCorrectionTester _tester) { - super(_data, _panel, _tester, _line); - selectedLine_ = _line; - - } - - protected void actFirstTest(final ProgressionInterface _prog) { - // premier r\xE9sultats pour voir s'il y a des intersections - final EfLineIntersectionsResultsI res = getDefaultRes((CtuluVariable) initVar_.getElementAt(0), _prog); - if (res.isEmpty()) { - - showNoIntersectionFound(); - } else { - final MvExportChooseVarAndTime export = createVarTimeChooser(getHelpForVarTime()); - if (export.afficheModaleOk(CtuluLibSwing.getActiveWindow(), MvResource.getS("Profils spatiaux"), export - .getListRunnable())) { - final CtuluTaskDelegate task = ui_.createTask(FudaaLib.getS("Construction des courbes")); - task.start(new Runnable() { - public void run() { - MvProfileBuilderFromLine.this.actBuildGroup(task.getStateReceiver(), export); - } - }); - - } - - } - close(); - } - - @Override - protected void stepOne() { - final CtuluTaskDelegate task = ui_.createTask(DodicoLib.getS("Recherche intersections")); - task.start(new Runnable() { - public void run() { - actFirstTest(task.getStateReceiver()); - } - }); - - } - -} \ No newline at end of file Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileBuilderFromTree.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,189 +0,0 @@ -/* - * @creation 13 juin 07 - * @modification $Date: 2007-06-13 12:58:07 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import java.util.Observable; -import java.util.Observer; - -import javax.swing.JComponent; -import javax.swing.JDialog; -import javax.swing.SwingUtilities; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; - -import com.memoire.bu.BuBorders; -import com.memoire.bu.BuGlassPaneStop; -import com.memoire.bu.BuHorizontalLayout; -import com.vividsolutions.jts.geom.LineString; - -import org.fudaa.ctulu.CtuluLib; -import org.fudaa.ctulu.CtuluLibString; -import org.fudaa.ctulu.CtuluTaskDelegate; -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ctulu.gui.CtuluDialogPanel; -import org.fudaa.ctulu.gui.CtuluLibSwing; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsCorrectionTester; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; -import org.fudaa.fudaa.commun.FudaaLib; -import org.fudaa.fudaa.meshviewer.MvResource; -import org.fudaa.fudaa.meshviewer.export.MvExportChooseVarAndTime; - -public class MvProfileBuilderFromTree extends MvProfileBuilder { - ZEbliCalquesPanel calque_; - - final MvLineChooser lineChooser_; - - /** - * panel qui contient les calques des isolignes - */ - JComponent panelTreeIsoLignes; - - /** - * panel des pas de temps et variables - */ - MvExportChooseVarAndTime varTime_; - - public MvProfileBuilderFromTree(final MvProfileTarget _data, final CtuluUI _ui, final LineString _selected, - final ZEbliCalquesPanel _panel, final EfLineIntersectionsCorrectionTester _tester) { - super(_data, _panel, _tester, _selected); - // lineTreeModel_ = new CalqueFindCourbeTreeModel(null, _panel.getDonneesCalque()); - // initSelected_ = _selected; - calque_ = _panel; - lineChooser_ = new MvLineChooser(_selected, panel_); - - } - - @Override - public void close() { - lineChooser_.close(); - } - - /** - * @return the panelTreeIsoLignes - */ - public JComponent getPanelTreeIsoLignes() { - return panelTreeIsoLignes; - } - - /** - * @return - * @see org.fudaa.fudaa.meshviewer.profile.MvLineChooser#getSelectedLine() - */ - public LineString getSelectedLine() { - return lineChooser_.getSelectedLine(); - } - - /** - * @return - * @see org.fudaa.fudaa.meshviewer.profile.MvLineChooser#getSelectedLineName() - */ - public String getSelectedLineName() { - return lineChooser_.getSelectedLineName(); - } - - public MvExportChooseVarAndTime getVarTime() { - return varTime_; - } - - protected void intersectTest(final JDialog _d, final MvExportChooseVarAndTime _var, final ProgressionInterface _prog) { - final EfLineIntersectionsResultsI res = getDefaultRes((CtuluVariable) initVar_.getElementAt(0), _prog); - if (res == null || res.isEmpty()) { - showNoIntersectionFound(); - } else { - _d.dispose(); - actBuildGroup(_prog, _var); - } - - } - - // public JTree tree_; - - /** - * construit les panels des parametres. - */ - @SuppressWarnings("serial") - @Override - public void stepOne() { - if (panelTreeIsoLignes != null) return; - - panelTreeIsoLignes = lineChooser_.getPanel(MvResource.getS("S\xE9lectionner la ligne \xE0 utiliser pour le profil")); - varTime_ = createVarTimeChooser(getHelpForVarTime()); - - final CtuluDialogPanel pn = new CtuluDialogPanel() { - @Override - public boolean valide() { - if (!CtuluLibString.isEmpty(getErrorText())) { return false; } - MvProfileBuilderFromTree.this.selectedLine_ = lineChooser_.getSelectedLine(); - MvProfileBuilderFromTree.this.name_ = lineChooser_.getSelectedLineName(); - final JDialog d = (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, this); - final CtuluTaskDelegate task = MvProfileBuilderFromTree.this.ui_.createTask(FudaaLib - .getS("Construction des courbes")); - final BuGlassPaneStop glassPaneStop = new BuGlassPaneStop(); - d.setGlassPane(glassPaneStop); - task.start(new Runnable() { - public void run() { - intersectTest(d, varTime_, task.getStateReceiver()); - glassPaneStop.setVisible(false); - d.getRootPane().remove(glassPaneStop); - } - }); - - return false; - } - }; - final ListSelectionListener listListener = new ListSelectionListener() { - - public void valueChanged(final ListSelectionEvent _e) { - updateError(pn, varTime_.computeErrorText()); - } - - }; - if (varTime_.getTimeSelectionModel() != null) { - varTime_.getTimeSelectionModel().addListSelectionListener(listListener); - } - varTime_.getVarSelectionModel().addListSelectionListener(listListener); - - pn.setLayout(new BuHorizontalLayout(5)); - panelTreeIsoLignes.setBorder(CtuluLibSwing.createTitleBorder(CtuluLib.getS("Etape {0}:", CtuluLibString.UN))); - varTime_.setBorder(CtuluLibSwing.createTitleBorder(CtuluLib.getS("Etape {0}:", CtuluLibString.DEUX))); - pn.add(panelTreeIsoLignes); - pn.add(varTime_); - pn.setBorder(BuBorders.EMPTY3333); - lineChooser_.addObserver(new Observer() { - - public void update(final Observable _o, final Object _arg) { - updateError(pn, lineChooser_.getError()); - - } - }); - final String error = lineChooser_.getError(); - updateError(pn, error); - if (error == null) { - updateError(pn, varTime_.getErrorText()); - } - - // -- integration du parent component dans le wizard des profils spatiaux - // --// - - // pn.afficheModale(ui_.getParentComponent(), - // MvResource.getS("Profils spatiaux"), varTime.getListRunnable()); - close(); - - } - - protected void updateError(final CtuluDialogPanel _target, final String _err) { - if (_err == null) { - _target.cancelErrorText(); - } else { - _target.setErrorText(_err); - } - } -} \ No newline at end of file Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,207 +0,0 @@ -/* - * @creation 27 nov. 06 - * @modification $Date: 2007-06-13 12:58:08 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import java.util.Map; - -import org.fudaa.ctulu.CtuluCommandContainer; -import org.fudaa.ctulu.CtuluListSelectionInterface; -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsBuilder; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; -import org.fudaa.ebli.courbe.EGGrapheTreeModel; -import org.fudaa.ebli.courbe.EGModel; -import org.fudaa.ebli.palette.BPaletteInfo.InfoData; - -/** - * @author fred deniger - * @version $Id: MvProfileCoordinatesModel.java,v 1.8 2007-06-13 12:58:08 deniger Exp $ - */ -public class MvProfileCoordinatesModel implements MvProfileCourbeModelInterface { - - final boolean isX_; - - EfLineIntersectionsResultsI res_; - - String title_; - double ymax_; - double ymin_; - - public MvProfileCoordinatesModel(final EfLineIntersectionsResultsI _res, final boolean _isX) { - super(); - res_ = _res; - isX_ = _isX; - title_ = isX_ ? "X" : "Y"; - updateRes(); - - } - - public void replayData(EGGrapheTreeModel _model, Map _infos, CtuluUI _impl) {} - - public int getActiveTimeIdx() { - return 0; - } - - public boolean isActiveTimeEnable() { - return false; - } - - private void updateRes() { - if (res_.getNbIntersect() > 0) { - double min = isX_ ? res_.getIntersect(0).getX() : res_.getIntersect(0).getY(); - double max = min; - for (int i = res_.getNbIntersect() - 1; i > 0; i--) { - final double val = isX_ ? res_.getIntersect(i).getX() : res_.getIntersect(i).getY(); - if (val < min) { - min = val; - } - if (val > max) { - max = val; - } - } - ymin_ = min; - ymax_ = max; - } else { - ymin_ = 0; - ymax_ = 0; - } - } - - public boolean addValue(final double _x, final double _y, final CtuluCommandContainer _cmd) { - return false; - } - - public boolean addValue(final double[] _x, final double[] _y, final CtuluCommandContainer _cmd) { - return false; - } - - public boolean deplace(final int[] _selectIdx, final double _deltaX, final double _deltaY, - final CtuluCommandContainer _cmd) { - return false; - } - - public int getNbValues() { - return res_.getNbIntersect(); - } - - public EfLineIntersectionsResultsI getRes() { - return res_; - } - - public String getTitle() { - return title_; - } - - public double getX(final int _idx) { - return res_.getDistFromDeb(_idx); - } - - public double getXMax() { - return res_.getDistFromDeb(getNbValues() - 1); - } - - public double getXMin() { - return 0; - } - - public double getY(final int _idx) { - return isX_ ? res_.getIntersect(_idx).getX() : res_.getIntersect(_idx).getY(); - } - - public double getYMax() { - return ymax_; - } - - public double getYMin() { - return ymin_; - } - - public boolean isDuplicatable() { - return false; - } - - public boolean isModifiable() { - return true; - } - - public boolean isPointDrawn(final int _i) { - return true; - } - - public boolean isRemovable() { - return true; - } - - public boolean isSegmentDrawn(final int _i) { - return true; - } - - public boolean isTitleModifiable() { - return true; - } - - public boolean isXModifiable() { - return false; - } - - public boolean removeValue(final int _i, final CtuluCommandContainer _cmd) { - return false; - } - - public boolean removeValue(final int[] _i, final CtuluCommandContainer _cmd) { - return false; - } - - public void reupdateY() {} - - public void setRes(final EfLineIntersectionsResultsBuilder _res, final ProgressionInterface _prog) { - res_ = _res.getInitRes(); - updateRes(); - - } - - public boolean setTitle(final String _newName) { - if (_newName != null && _newName != title_) { - title_ = _newName; - return true; - } - return false; - } - - public boolean setValue(final int _i, final double _x, final double _y, final CtuluCommandContainer _cmd) { - return false; - } - - public boolean setValues(final int[] _idx, final double[] _x, final double[] _y, final CtuluCommandContainer _cmd) { - return false; - } - - public void fillWithInfo(final InfoData _table, final CtuluListSelectionInterface _selectedPt) {} - - public EGModel duplicate() { - - final MvProfileCoordinatesModel duplic = new MvProfileCoordinatesModel(this.res_, isX_); - duplic.title_ = this.title_; - duplic.ymax_ = this.ymax_; - duplic.ymin_ = this.ymin_; - - return duplic; - } - - public Object getPersistSpecificDatas() { - return null; - } - - public void setPersistSpecificDatas(Object data, Map infos) { - - } - public void viewGenerationSource(Map infos, CtuluUI impl){ - - } -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,119 +0,0 @@ -/* - * @creation 13 juin 07 - * @modification $Date: 2007-06-20 12:23:43 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import java.util.List; - -import com.memoire.fu.FuLog; - -import org.fudaa.ctulu.CtuluLib; -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.dodico.ef.operation.EfIndexVisitorNearestElt; -import org.fudaa.dodico.ef.operation.EfIndexVisitorNearestNode; -import org.fudaa.dodico.ef.operation.EfLineIntersection; -import org.fudaa.dodico.ef.operation.EfLineIntersectionParent; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsCorrectionTester; -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; -import org.fudaa.dodico.h2d.type.H2dVariableType; - -/** - * Permet de corriger les effets de bords constat\xE9s avec les cotes d'eau. - * - * @author fred deniger - * @version $Id: MvProfileCoteTester.java,v 1.2 2007-06-20 12:23:43 deniger Exp $ - */ -public class MvProfileCoteTester implements EfLineIntersectionsCorrectionTester { - - final CtuluVariable bathy_; - final CtuluVariable cote_; - final double eps_ = 1E-3; - - public MvProfileCoteTester() { - super(); - bathy_ = H2dVariableType.BATHYMETRIE; - cote_ = H2dVariableType.COTE_EAU; - } - - - - private boolean addIntersection(final int _tidx, final EfLineIntersection _sup1, final EfLineIntersection _min2, - final List _setNewIn) { - final double b1 = _sup1.getValue(bathy_, _tidx); - final double b2 = _min2.getValue(bathy_, _tidx); - final double c1 = _sup1.getValue(cote_, _tidx); - if (c1 > b2) { return false; } - final double alpha = (c1 - b1) / (b2 - b1); - final double x1 = _sup1.getX(); - final double y1 = _sup1.getY(); - if (alpha >= 1 || alpha <= 0) { return false; } - final double nx = x1 + (_min2.getX() - x1) * alpha; - final double ny = y1 + (_min2.getY() - y1) * alpha; - final EfLineIntersectionParent parent = _sup1.getParent(); - final EfIndexVisitorNearestElt elt = new EfIndexVisitorNearestElt(parent.getGrid(), nx, ny, 1E-3); - parent.getGrid().getIndex().query(EfIndexVisitorNearestNode.getEnvelope(nx, ny, 1E-2), elt); - if (elt.getSelected() >= 0) { - final SpecIntersection specIntersection = new SpecIntersection(elt.getSelected(), nx, ny, _tidx, c1); - specIntersection.setParent(_sup1.getParent()); - _setNewIn.add(specIntersection); - return true; - } - FuLog.error("Erreur lors de la correction du profil pour la cote"); - return false; - - } - - public boolean createNews(final int _tidx, final EfLineIntersection _i1, final EfLineIntersection _i2, - final List _setNewIn) { - if(!_i1.isRealIntersection()|| !_i2.isRealIntersection()) return false; - // les b repr\xE9sentent la bathy - final double b1 = _i1.getValue(bathy_, _tidx); - final double b2 = _i2.getValue(bathy_, _tidx); - // les b repr\xE9sentent la cote d'eau - final double c1 = _i1.getValue(cote_, _tidx); - final double c2 = _i2.getValue(cote_, _tidx); - // h = hauteur d'eau - final double h1 = c1 - b1; - final double h2 = c2 - b2; - final boolean isZero1 = CtuluLib.isZero(h1, eps_); - final boolean isZero2 = CtuluLib.isZero(h2, eps_); - // ok si 2 points \xE0 zero - if (isZero1 && isZero2) { return false; } - // ok si les 2 points sont strictement positifs ou strictement n\xE9gatifs - if (!isZero1 && !isZero2 && h1 * h2 > 0) { return false; } - if (b1 < b2) return addIntersection(_tidx, _i1, _i2, _setNewIn); - return addIntersection(_tidx, _i2, _i1, _setNewIn); - } - - protected static class SpecIntersection extends EfLineIntersection.ItemMesh { - - final int tidx_; - final double cote_; - - public SpecIntersection(final int _ielt, final double _x, final double _y, final int _tidx, final double _cote) { - super(_ielt, _x, _y); - tidx_ = _tidx; - cote_ = _cote; - } - - @Override - public double getValue(final CtuluVariable _var, final int _tIdx) { - if (_tIdx == tidx_) { - if (_var == H2dVariableType.HAUTEUR_EAU || _var == H2dVariableType.VITESSE_U - || _var == H2dVariableType.VITESSE_V || _var == H2dVariableType.VITESSE) return 0; - if (_var == H2dVariableType.COTE_EAU || _var == H2dVariableType.BATHYMETRIE) { return cote_; } - } - - return super.getValue(_var, _tIdx); - } - - } - - public boolean isEnableFor(EfLineIntersectionsResultsI _res) { - return _res!=null && _res.isDataAvailable(bathy_) && _res.isDataAvailable(cote_); - } -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbe.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbe.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbe.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,60 +0,0 @@ -/* - * @creation 21 nov. 06 - * @modification $Date: 2007-02-02 11:22:11 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ebli.courbe.EGCourbeChild; -import org.fudaa.ebli.courbe.EGModel; -import org.fudaa.ebli.courbe.EGModelDecorator; - -/** - * @author fred deniger - * @version $Id: MvProfileCourbe.java,v 1.4 2007-02-02 11:22:11 deniger Exp $ - */ -public class MvProfileCourbe extends EGCourbeChild implements MvProfileCourbeInterface { - - public MvProfileCourbe(final MvProfileCourbeGroup _m, final MVProfileCourbeModel _model) { - super(_m, _model); - } - - public MvProfileCourbeModelInterface getProfileModel() { - return (MVProfileCourbeModel) super.getModel(); - } - - protected MVProfileCourbeModel getM() { - return (MVProfileCourbeModel) super.getModel(); - } - - /** - * POur l'instant: comment mettre a jour les pas de temps. - */ - @Override - public boolean isTitleModifiable() { - return true; - } - - @Override - public void setModel(final EGModel _model) { - if (!(_model instanceof MVProfileCourbeModel) ){ - - if(!(_model instanceof EGModelDecorator) ) - { throw new IllegalAccessError(); } - } - super.setModel(_model); - } - - public void setVar(final CtuluVariable _v, final boolean _contentChanged) { - getM().setVariable(_v, _contentChanged); - if (_v != getM().getVariable()) { - setTitle(_v.getName()); - } - fireCourbeContentChanged(); - - } - -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeGroup.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeGroup.java 2009-10-15 04:05:54 UTC (rev 5274) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeGroup.java 2009-10-15 04:09:46 UTC (rev 5275) @@ -1,65 +0,0 @@ -/* - * @creation 21 nov. 06 - * @modification $Date: 2007-05-04 13:59:49 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.fudaa.meshviewer.profile; - -import java.util.Iterator; - -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ebli.courbe.EGCourbeChild; -import org.fudaa.ebli.courbe.EGGrapheDuplicator; -import org.fudaa.ebli.courbe.EGGroup; - -/** - * @author fred deniger - * @version $Id: MvProfileCourbeGroup.java,v 1.5 2007-05-04 13:59:49 deniger Exp $ - */ -public class MvProfileCourbeGroup extends EGGroup { - - private final CtuluVariable var_; - - public MvProfileCourbeGroup(final CtuluVariable _var) { - super(); - var_ = _var; - setTitle(var_.toString()); - } - - @Override - public boolean isTitleModifiable() { - return false; - } - - public CtuluVariable getVar() { - return var_; - } - -@Override -public EGGroup duplicate(EGGrapheDuplicator _duplicator) { - - - // -- duplication de l objet --// - EGGroup duplic = new MvProfileCourbeGroup(var_); - duplic.setVisible(this.isVisible_); - duplic.setTitle(this.getTitle()); - duplic.setEgParent(this.getEgParent()); - duplic.setAxeY(this.getAxeY().duplicate()); - for (Iterator it = this.getChildren().iterator(); it.hasNext();) { - Object item = it.next(); - if (item instanceof EGCourbeChild) { - duplic.addEGComponent((EGCourbeChild)((EGCourbeChild) item).duplicate(duplic,_duplicator)); - } - - } - - return duplic; - - -} - - - -} Deleted: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/profil... [truncated message content] |