|
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.
|
|
From: <de...@us...> - 2014-01-07 21:10:45
|
Revision: 8562
http://sourceforge.net/p/fudaa/svn/8562
Author: deniger
Date: 2014-01-07 21:10:41 +0000 (Tue, 07 Jan 2014)
Log Message:
-----------
CRUE-598
Modified Paths:
--------------
trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalBrancheChooserUI.java
trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalRightVariableChooser.java
trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/longitudinal/Bundle.properties
Modified: trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalBrancheChooserUI.java
===================================================================
--- trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalBrancheChooserUI.java 2014-01-07 20:53:57 UTC (rev 8561)
+++ trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalBrancheChooserUI.java 2014-01-07 21:10:41 UTC (rev 8562)
@@ -65,7 +65,7 @@
usedBranche.add(name);
}
double length = config.getLength();
- if (length <= 0) {
+ if (length < 0) {
error.addError(NbBundle.getMessage(ReportLongitudinalBrancheChooserUI.class, "BrancheConfig.BrancheLengthNegativeOrNull.error"), idx, name);
}
Modified: trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalRightVariableChooser.java
===================================================================
--- trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalRightVariableChooser.java 2014-01-07 20:53:57 UTC (rev 8561)
+++ trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/longitudinal/ReportLongitudinalRightVariableChooser.java 2014-01-07 21:10:41 UTC (rev 8562)
@@ -86,7 +86,8 @@
createLines.get(0).updateCheckBoxes(runKeys);
}
- boolean ok = DialogHelper.showQuestionAndSaveDialogConf(NbBundle.getMessage(ReportLongitudinalRightVariableChooser.class, "ChooseRightVariable.DialogTitle"), pn, getClass(), "vueProfilLongitudinalConfigurationAutresVariables", PerspectiveEnum.REPORT);
+ boolean ok = DialogHelper.showQuestionAndSaveDialogConf(NbBundle.getMessage(ReportLongitudinalRightVariableChooser.class,
+ "ChooseRightVariable.DialogTitle"), pn, getClass(), "vueProfilLongitudinalConfigurationAutresVariables", PerspectiveEnum.REPORT);
if (ok) {
config.removeAllVariableDrawnOnRightAxis(reportResultProviderService);
String newVar = (String) cb1.getSelectedItem();
@@ -94,9 +95,11 @@
newVar = null;
}
ReportVariableKey varKey = newVar == null ? null : reportResultProviderService.createVariableKey(newVar);
- List<ReportRunKey> selectedKeys = createLines.get(0).getSelectedKeys();
- for (ReportRunKey reportRunKey : selectedKeys) {
- config.profilVariables.add(new ReportRunVariableKey(reportRunKey, varKey));
+ if (newVar != null) {
+ List<ReportRunKey> selectedKeys = createLines.get(0).getSelectedKeys();
+ for (ReportRunKey reportRunKey : selectedKeys) {
+ config.profilVariables.add(new ReportRunVariableKey(reportRunKey, varKey));
+ }
}
}
Modified: trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/longitudinal/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/longitudinal/Bundle.properties 2014-01-07 20:53:57 UTC (rev 8561)
+++ trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/longitudinal/Bundle.properties 2014-01-07 21:10:41 UTC (rev 8562)
@@ -15,7 +15,7 @@
aval_amont.name=(-)
BrancheConfig.BrancheNameIsEmpty.error=Ligne {0}: le nom de la branche est vide
BrancheConfig.BrancheNameAlreadyUsed.error=Ligne {0}: la branche {1} est d\u00e9j\u00e0 utilis\u00e9e
-BrancheConfig.BrancheLengthNegativeOrNull.error=Ligne {0}: la longueur d''affichage de la branche {1} est inf\u00e9rieure ou \u00e9gale \u00e0 0
+BrancheConfig.BrancheLengthNegativeOrNull.error=Ligne {0}: la longueur d''affichage de la branche {1} est inf\u00e9rieure \u00e0 0
ChooseTime.DialogTitle=Choix des pas de temps
ChooseRightVariable.Label=Variable affich\u00e9e \u00e0 droite
ChooseRightVariable.DialogTitle=Choix variable
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|