|
From: <de...@us...> - 2014-01-07 20:54:00
|
Revision: 8561
http://sourceforge.net/p/fudaa/svn/8561
Author: deniger
Date: 2014-01-07 20:53:57 +0000 (Tue, 07 Jan 2014)
Log Message:
-----------
CRUE-597
Modified Paths:
--------------
trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/transversal/ReportProfilTransversalTopComponent.java
trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/transversal/Bundle.properties
Modified: trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/transversal/ReportProfilTransversalTopComponent.java
===================================================================
--- trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/transversal/ReportProfilTransversalTopComponent.java 2014-01-07 20:35:30 UTC (rev 8560)
+++ trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/transversal/ReportProfilTransversalTopComponent.java 2014-01-07 20:53:57 UTC (rev 8561)
@@ -145,7 +145,6 @@
protected void chooseSection() {
final List<CatEMHSection> sections = reportService.getModele().getSections();
List<String> sectionNames = TransformerHelper.toNom(sections);
- Collections.sort(sectionNames);
ChooseInListHelper<String> chooser = new ChooseInListHelper<String>();
chooser.setLabel(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSectionName.Label"));
chooser.setDialogTitle(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSection.DialogTitle"));
@@ -165,6 +164,9 @@
}
private CatEMHSection findSection(CatEMHSection current, int inc) {
+ if (current == null) {
+ return null;
+ }
CatEMHBranche branche = current.getBranche();
if (branche != null) {
List<RelationEMHSectionDansBranche> listeSections = branche.getListeSections();
@@ -178,7 +180,7 @@
NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "NoAvalSectionWithResultat.DialogContent"));
} else {
DialogHelper.showInfo(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "SectionNavigation.InfoDialog"),
- NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "NoAvalSectionWithResultat.DialogContent"));
+ NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "SeveralAvalBranche.DialogContent"));
}
return null;
@@ -186,11 +188,7 @@
branche = branchesAval.get(0);
listeSections = branche.getListeSections();
CatEMHSection first = listeSections.get(0).getEmh();
-// if (first.hasResultat()) {
return first;
-// } else {
-// return findSection(first, inc);
-// }
} else if (idx < 0) {
List<CatEMHBranche> branchesAmont = branche.getNoeudAmont().getBranchesAmont();
final boolean empty = CollectionUtils.isEmpty(branchesAmont);
@@ -200,7 +198,7 @@
NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "NoAmontSectionWithResultat.DialogContent"));
} else {
DialogHelper.showInfo(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "SectionNavigation.InfoDialog"),
- NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "NoAmontSectionWithResultat.DialogContent"));
+ NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "SeveralAmontBranche.DialogContent"));
}
return null;
@@ -261,30 +259,34 @@
@Override
public List<EbliActionInterface> getMainActions() {
- EbliActionSimple chooseSection = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSection.ButtonName"), null, "SECTIONS") {
- @Override
- public void actionPerformed(ActionEvent _e) {
- chooseSection();
- }
- };
- EbliActionSimple amont = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSectionAmont.ButtonName"), ReportHelper.getIcon("navigation_previous.png"), "AMONT") {
- @Override
- public void actionPerformed(ActionEvent _e) {
- chooseAmont();
- }
- };
- EbliActionSimple aval = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSectionAval.ButtonName"), ReportHelper.getIcon("navigation_next.png"), "NEXT") {
- @Override
- public void actionPerformed(ActionEvent _e) {
- chooseAval();
- }
- };
- EbliActionSimple chooseVariables = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "AddVariable.ButtonName"), null, "VARIABLES") {
- @Override
- public void actionPerformed(ActionEvent _e) {
- chooseProfilVariables();
- }
- };
+ EbliActionSimple chooseSection = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSection.ButtonName"),
+ null, "SECTIONS") {
+ @Override
+ public void actionPerformed(ActionEvent _e) {
+ chooseSection();
+ }
+ };
+ EbliActionSimple amont = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSectionAmont.ButtonName"),
+ ReportHelper.getIcon("navigation_previous.png"), "AMONT") {
+ @Override
+ public void actionPerformed(ActionEvent _e) {
+ chooseAmont();
+ }
+ };
+ EbliActionSimple aval = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "ChooseSectionAval.ButtonName"),
+ ReportHelper.getIcon("navigation_next.png"), "NEXT") {
+ @Override
+ public void actionPerformed(ActionEvent _e) {
+ chooseAval();
+ }
+ };
+ EbliActionSimple chooseVariables = new EbliActionSimple(NbBundle.getMessage(ReportProfilTransversalTopComponent.class, "AddVariable.ButtonName"),
+ null, "VARIABLES") {
+ @Override
+ public void actionPerformed(ActionEvent _e) {
+ chooseProfilVariables();
+ }
+ };
return Arrays.asList((EbliActionInterface) chooseSection, amont, aval, chooseVariables, createConfigExternAction());
}
Modified: trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/transversal/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/transversal/Bundle.properties 2014-01-07 20:35:30 UTC (rev 8560)
+++ trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/transversal/Bundle.properties 2014-01-07 20:53:57 UTC (rev 8561)
@@ -9,7 +9,7 @@
ChooseSection.DialogTitle=Profil en travers
SectionNavigation.InfoDialog=Navigation
NoAmontSectionWithResultat.DialogContent=Aucune section amont n'a \u00e9t\u00e9 trouv\u00e9e
-SeveralAontBranche.DialogContent=La navigation vers l'amont est impossible: plusieurs branches amont
+SeveralAmontBranche.DialogContent=La navigation vers l'amont est impossible: plusieurs branches amont
NoAvalSectionWithResultat.DialogContent=Aucune section aval n'a \u00e9t\u00e9 trouv\u00e9e
SeveralAvalBranche.DialogContent=La navigation vers l'aval est impossible: plusieurs branches aval
ConfigureTitle.Action=Configurer le titre
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|