From: <de...@us...> - 2016-04-26 22:05:23
|
Revision: 9388 http://sourceforge.net/p/fudaa/svn/9388 Author: deniger Date: 2016-04-26 22:05:21 +0000 (Tue, 26 Apr 2016) Log Message: ----------- version 1.9-SNAPSHOT Modified Paths: -------------- trunk/soft/fudaa-modeleur/pom.xml trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/view/VueCourbe.java Modified: trunk/soft/fudaa-modeleur/pom.xml =================================================================== --- trunk/soft/fudaa-modeleur/pom.xml 2016-04-26 22:01:01 UTC (rev 9387) +++ trunk/soft/fudaa-modeleur/pom.xml 2016-04-26 22:05:21 UTC (rev 9388) @@ -39,51 +39,45 @@ <artifactId>fudaa-mesh</artifactId> <version>${fudaa-mesh.version}</version> <exclusions> - <!-- exclude ebli common --> - <exclusion> - <groupId>org.fudaa.framework.ebli</groupId> - <artifactId>ebli-1d</artifactId> - </exclusion> - </exclusions> + <!-- exclude ebli common --> + <exclusion> + <groupId>org.fudaa.framework.ebli</groupId> + <artifactId>ebli-1d</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-1d</artifactId> <!-- il nous faut les dernières version de ebli common --> - <version>${fudaa-framework.version}</version> <exclusions> - <!-- exclude ebli common --> - <exclusion> - <groupId>org.fudaa.framework.ebli</groupId> - <artifactId>ebli-common</artifactId> - </exclusion> - </exclusions> + <!-- exclude ebli common --> + <exclusion> + <groupId>org.fudaa.framework.ebli</groupId> + <artifactId>ebli-common</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> - <groupId>org.fudaa.framework.ctulu</groupId> - <artifactId>ctulu-fu</artifactId> - <version>${fudaa-framework.version}</version> - </dependency> - <dependency> - <groupId>org.fudaa.framework.ctulu</groupId> - <artifactId>ctulu-bu</artifactId> - <version>${fudaa-framework.version}</version> - </dependency> - <dependency> - <groupId>org.fudaa.framework.ctulu</groupId> - <artifactId>ctulu-ui</artifactId> - <version>${fudaa-framework.version}</version> - </dependency> - <dependency> - <groupId>org.fudaa.framework.ebli</groupId> - <artifactId>ebli-common</artifactId> - <version>${fudaa-framework.version}</version> - </dependency> - <dependency> - <groupId>org.fudaa.business.fudaa-ef</groupId> - <artifactId>ef-core</artifactId> - <version>${fudaa-business.version}</version> - </dependency> + <groupId>org.fudaa.framework.ctulu</groupId> + <artifactId>ctulu-fu</artifactId> + </dependency> + <dependency> + <groupId>org.fudaa.framework.ctulu</groupId> + <artifactId>ctulu-bu</artifactId> + </dependency> + <dependency> + <groupId>org.fudaa.framework.ctulu</groupId> + <artifactId>ctulu-ui</artifactId> + </dependency> + <dependency> + <groupId>org.fudaa.framework.ebli</groupId> + <artifactId>ebli-common</artifactId> + </dependency> + <dependency> + <groupId>org.fudaa.business.fudaa-ef</groupId> + <artifactId>ef-core</artifactId> + </dependency> <dependency> <groupId>junit</groupId> Modified: trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/view/VueCourbe.java =================================================================== --- trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/view/VueCourbe.java 2016-04-26 22:01:01 UTC (rev 9387) +++ trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/view/VueCourbe.java 2016-04-26 22:05:21 UTC (rev 9388) @@ -107,7 +107,7 @@ double zoffSet_; private String title; - + public CourbeGeomModel() { } @@ -116,6 +116,11 @@ return false; } + @Override + public int[] getInitRows() { + return null; + } + /** * @return Retourne le profil associ\xE9. */ @@ -344,7 +349,7 @@ } public String getTitle() { - return title!=null?title:MdlResource.getS("Courbe"); + return title != null ? title : MdlResource.getS("Courbe"); } public double getX(int _idx) { @@ -542,10 +547,6 @@ public void replayData(EGGrapheModel model, Map infos, CtuluUI impl) { } - @Override - public int[] getInitRows() { - return null; - } } protected class EmptyCurveModel implements EGModel { @@ -556,6 +557,11 @@ } @Override + public int[] getInitRows() { + return null; + } + + @Override public boolean useSpecificIcon(int idx) { return false; } @@ -686,10 +692,6 @@ public void replayData(EGGrapheModel model, Map infos, CtuluUI impl) { } - @Override - public int[] getInitRows() { - return null; - } } /** @@ -782,7 +784,7 @@ * La courbe suivante */ EGCourbeSimple nextCurve_; - + /* Un modele de courbe vide */ // EmptyCurveModel emptyModel_=new EmptyCurveModel(); // Les boutons permettant de modifier les positions des rives et des limites de stockages. \\ @@ -794,7 +796,6 @@ BuToggleButton btShowPrevNext_; private EGGrapheSimpleModel grapheModel_; - private EGAxeVertical axeY_; private ProfileSetI profSet_; private int selectedPrf_ = -1; @@ -874,9 +875,9 @@ // Les actions a conserver. HashSet<String> actionsKept = new HashSet<String>(Arrays.asList( new String[]{ - "SELECT", "RESTORE", "AUTO_REST", "CONFIGURE_REPERE", - "ZOOM", "SUIVI", "MOVE_POINT", "CONFIGURE", "INFOS", "TABLE" - })); + "SELECT", "RESTORE", "AUTO_REST", "CONFIGURE_REPERE", + "ZOOM", "SUIVI", "MOVE_POINT", "CONFIGURE", "INFOS", "TABLE" + })); for (int i = 0; i < actionAbs.length; i++) { if (actionAbs[i] != null && actionsKept.contains(actionAbs[i].getValue(Action.ACTION_COMMAND_KEY))) { @@ -897,7 +898,8 @@ _actions.add(btShowPrevNext_); // Bouton d'alignement. - EbliActionPaletteAbstract btAlign = new EbliActionPaletteAbstract(MdlResource.getS("Alignement des profils"), MdlResource.MDL.getIcon("aligner-profils"), "ALIGNMENT") { + EbliActionPaletteAbstract btAlign = new EbliActionPaletteAbstract(MdlResource.getS("Alignement des profils"), MdlResource.MDL.getIcon( + "aligner-profils"), "ALIGNMENT") { @Override protected JComponent buildContentPane() { return new CurveOptionPanel(VueCourbe.this); @@ -1138,7 +1140,7 @@ prevCurve_.setAspectContour(c); prevCurve_.setIconeModel(new TraceIconModel(TraceIcon.CARRE_PLEIN, 1, c)); grapheModel_.addCourbe(prevCurve_, null); - + c = Color.GREEN.darker(); nextCurve_ = new EGCourbeSimple(axeY_, new CourbeGeomModel()); nextCurve_.setLigneModel(new TraceLigneModel(TraceLigne.TIRETE, 0.5f, c)); @@ -1155,9 +1157,9 @@ grapheModel_.addCourbe(courbe_, null); } - public EGCourbeSimple getCourbe() { - return courbe_; - } + public EGCourbeSimple getCourbe() { + return courbe_; + } /** * Mise a jour des courbes, par changement de mod\xE8le. @@ -1217,43 +1219,34 @@ grapheVue_.structureChanged(); } - - - - public int buildCurve(TraceLigneModel model, int idxProfil) { - CourbeGeomModel md = new CourbeGeomModel(); - EGCourbeSimple courbe = new EGCourbeSimple(axeY_, md); - courbe.setLigneModel(model); - courbe.setAspectContour(courbe.getLigneModel().getCouleur()); - courbe.setIconeModel(new TraceIconModel(TraceIcon.CARRE_PLEIN, 1, courbe.getLigneModel().getCouleur())); - grapheModel_.addCourbe(courbe, null); - ProfilContainerI pf = profSet_.getProfil(idxProfil); - double xoff = computeXOffset(pf, profSet_.getProfil(idxProfil)); - double zoff = computeZOffset(pf, profSet_.getProfil(idxProfil)); - md.setProfil(pf); - md.setOffsets(xoff, zoff); - courbe.setVisible(true); - courbe.setTitle(pf.getName()); - - - - return grapheModel_.getCourbes().length-1; - } - - - public void updateComparisonCurves(final int[] selection, final ComparisonCurvesPanel panelComparison, - final MdlCompareProfilePanel compPanel, final int idxProf) { - if (panelComparison.updateComparisonCurves(this, selection,compPanel, idxProf)) { - setPrevNextVisible(false); - grapheVue_.structureChanged(); - updateLabels(); - } + public int buildCurve(TraceLigneModel model, int idxProfil) { + CourbeGeomModel md = new CourbeGeomModel(); + EGCourbeSimple courbe = new EGCourbeSimple(axeY_, md); + courbe.setLigneModel(model); + courbe.setAspectContour(courbe.getLigneModel().getCouleur()); + courbe.setIconeModel(new TraceIconModel(TraceIcon.CARRE_PLEIN, 1, courbe.getLigneModel().getCouleur())); + grapheModel_.addCourbe(courbe, null); + ProfilContainerI pf = profSet_.getProfil(idxProfil); + double xoff = computeXOffset(pf, profSet_.getProfil(idxProfil)); + double zoff = computeZOffset(pf, profSet_.getProfil(idxProfil)); + md.setProfil(pf); + md.setOffsets(xoff, zoff); + courbe.setVisible(true); + courbe.setTitle(pf.getName()); + + return grapheModel_.getCourbes().length - 1; + } + + public void updateComparisonCurves(final int[] selection, final ComparisonCurvesPanel panelComparison, + final MdlCompareProfilePanel compPanel, final int idxProf) { + if (panelComparison.updateComparisonCurves(this, selection, compPanel, idxProf)) { + setPrevNextVisible(false); + grapheVue_.structureChanged(); + updateLabels(); } + } - - - /** * Mise a jour des lignes remarquables sur le graphe pour \xEAtre en conformit\xE9 avec le profil courant. */ @@ -1272,27 +1265,32 @@ // Rive gauche double absCurv = courbeModel_.getProfil().getAbsCurvRiveGauche(); if (absCurv != -1) { - courbe_.addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("RG"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.blue), false)); + courbe_. + addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("RG"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.blue), false)); } // Rive droite absCurv = courbeModel_.getProfil().getAbsCurvRiveDroite(); if (absCurv != -1) { - courbe_.addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("RD"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.blue), false)); + courbe_. + addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("RD"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.blue), false)); } // Axe hydraulique absCurv = courbeModel_.getProfil().getAbsCurvAxeHydrauliqueOnProfil(); if (absCurv != -1) { - courbe_.addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("AH"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.green.darker()), false)); + courbe_.addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("AH"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.green. + darker()), false)); } // Limite stockage gauche absCurv = courbeModel_.getProfil().getAbsCurvLimiteStockageGauche(); if (absCurv != -1) { - courbe_.addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("SG"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.green), false)); + courbe_.addMarqueur( + new EGCourbeMarqueur(absCurv, MdlResource.getS("SG"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.green), false)); } // Limite stockage droite absCurv = courbeModel_.getProfil().getAbsCurvLimiteStockageDroite(); if (absCurv != -1) { - courbe_.addMarqueur(new EGCourbeMarqueur(absCurv, MdlResource.getS("SD"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.green), false)); + courbe_.addMarqueur( + new EGCourbeMarqueur(absCurv, MdlResource.getS("SD"), true, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.green), false)); } // grapheVue_.structureChanged(); @@ -1313,16 +1311,13 @@ } public EGGrapheSimpleModel getGrapheModel() { - return grapheModel_; - } + return grapheModel_; + } - public EGGraphe getGraphe() { - return grapheVue_; - } + public EGGraphe getGraphe() { + return grapheVue_; + } - - - /** * Selectionne les points dont les indices sont pass\xE9s en param\xE8tre. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |