|
From: <de...@us...> - 2012-07-04 15:39:06
|
Revision: 7446
http://fudaa.svn.sourceforge.net/fudaa/?rev=7446&view=rev
Author: deniger
Date: 2012-07-04 15:39:00 +0000 (Wed, 04 Jul 2012)
Log Message:
-----------
version 0.54
Modified Paths:
--------------
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Resultat.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Trace.java
trunk/soft/fudaa-crue/ui-modelling/nb-configuration.xml
trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/calcul/Bundle.properties
trunk/soft/fudaa-crue/ui-modelling/src/test/java/org/fudaa/fudaa/crue/modelling/calcul/PropertiesSheetTest.java
Added Paths:
-----------
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/SortiesNode.java
Removed Paths:
-------------
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/AvancementNode.java
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Resultat.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Resultat.java 2012-07-04 15:13:43 UTC (rev 7445)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Resultat.java 2012-07-04 15:39:00 UTC (rev 7446)
@@ -1,6 +1,7 @@
package org.fudaa.dodico.crue.metier.emh;
import org.fudaa.dodico.crue.config.CrueConfigMetier;
+import org.fudaa.dodico.crue.metier.annotation.PropertyDesc;
import org.fudaa.dodico.crue.metier.transformer.EnumToString;
import org.fudaa.dodico.crue.metier.transformer.ToStringTransformable;
@@ -19,6 +20,7 @@
/**
* @return the sortieFichier
*/
+ @PropertyDesc(i18n="sortieFichier.property")
public boolean getSortieFichier() {
return sortieFichier;
}
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Trace.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Trace.java 2012-07-04 15:13:43 UTC (rev 7445)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/Trace.java 2012-07-04 15:39:00 UTC (rev 7446)
@@ -12,6 +12,8 @@
private boolean sortieFichier;
private String verbositeEcran;
private String verbositeFichier;
+ public static String PROP_VERBOSITE_ECRAN = "verbositeEcran";
+ public static String PROP_VERBOSITE_FICHIER = "verbositeFichier";
/**
*
Modified: trunk/soft/fudaa-crue/ui-modelling/nb-configuration.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/nb-configuration.xml 2012-07-04 15:13:43 UTC (rev 7445)
+++ trunk/soft/fudaa-crue/ui-modelling/nb-configuration.xml 2012-07-04 15:39:00 UTC (rev 7446)
@@ -14,5 +14,6 @@
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<netbeans.hint.jdkPlatform>JDK_1.6</netbeans.hint.jdkPlatform>
+ <netbeans.compile.on.save>none</netbeans.compile.on.save>
</properties>
</project-shared-configuration>
Deleted: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/AvancementNode.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/AvancementNode.java 2012-07-04 15:13:43 UTC (rev 7445)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/AvancementNode.java 2012-07-04 15:39:00 UTC (rev 7446)
@@ -1,47 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.fudaa.fudaa.crue.modelling.calcul;
-
-import java.util.List;
-import java.util.ResourceBundle;
-import org.fudaa.dodico.crue.edition.bean.ListCommonProperties;
-import org.fudaa.dodico.crue.metier.emh.Avancement;
-import org.fudaa.fudaa.crue.common.property.PropertyCrueUtils;
-import org.fudaa.fudaa.crue.common.property.PropertyNodeBuilder;
-import org.fudaa.fudaa.crue.common.property.PropertySupportReflection;
-import org.fudaa.fudaa.crue.modelling.node.AbstractModellingNodeFirable;
-import org.fudaa.fudaa.crue.modelling.perspective.PerspectiveServiceModelling;
-import org.openide.nodes.Children;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-import org.openide.util.NbBundle;
-import org.openide.util.lookup.Lookups;
-
-/**
- *
- * @author Frédéric Deniger
- */
-public class AvancementNode extends AbstractModellingNodeFirable {
-
- public AvancementNode(Avancement avancement, PerspectiveServiceModelling perspectiveServiceModelling) {
- super(Children.LEAF, Lookups.singleton(avancement), perspectiveServiceModelling);
- setDisplayName(NbBundle.getMessage(AvancementNode.class, "AvancementNode.DisplayName"));
- }
-
- @Override
- protected Sheet createSheet() {
- Sheet sheet = Sheet.createDefault();
- Sheet.Set set = Sheet.createPropertiesSet();
- sheet.put(set);
- Avancement avancement = getLookup().lookup(Avancement.class);
- PropertyNodeBuilder nodeBuilder = new PropertyNodeBuilder();
- List<PropertySupportReflection> createFromPropertyDesc = nodeBuilder.createFromPropertyDesc(avancement, this);
- for (PropertySupportReflection propertySupportReflection : createFromPropertyDesc) {
- set.put(propertySupportReflection);
- }
-
- return sheet;
- }
-}
Added: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/SortiesNode.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/SortiesNode.java (rev 0)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/calcul/SortiesNode.java 2012-07-04 15:39:00 UTC (rev 7446)
@@ -0,0 +1,97 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.fudaa.fudaa.crue.modelling.calcul;
+
+import java.util.List;
+import org.fudaa.dodico.crue.config.CrueConfigMetier;
+import org.fudaa.dodico.crue.config.ItemEnum;
+import org.fudaa.dodico.crue.config.PropertyNature;
+import org.fudaa.dodico.crue.config.SeveriteManager;
+import org.fudaa.dodico.crue.metier.emh.Avancement;
+import org.fudaa.dodico.crue.metier.emh.Resultat;
+import org.fudaa.dodico.crue.metier.emh.Sorties;
+import org.fudaa.dodico.crue.metier.emh.Trace;
+import org.fudaa.fudaa.crue.common.property.PropertyNodeBuilder;
+import org.fudaa.fudaa.crue.common.property.PropertySupportReflection;
+import org.fudaa.fudaa.crue.modelling.node.AbstractModellingNodeFirable;
+import org.fudaa.fudaa.crue.modelling.perspective.PerspectiveServiceModelling;
+import org.openide.nodes.Children;
+import org.openide.nodes.Sheet;
+import org.openide.nodes.Sheet.Set;
+import org.openide.util.NbBundle;
+import org.openide.util.lookup.Lookups;
+
+/**
+ *
+ * @author Frédéric Deniger
+ */
+public class SortiesNode extends AbstractModellingNodeFirable {
+
+ public SortiesNode(Sorties sortie, CrueConfigMetier ccm, PerspectiveServiceModelling perspectiveServiceModelling) {
+ super(Children.LEAF, Lookups.fixed(sortie, ccm), perspectiveServiceModelling);
+ setDisplayName(NbBundle.getMessage(SortiesNode.class, "SortiesNode.DisplayName"));
+ }
+
+ @Override
+ protected Sheet createSheet() {
+ Sheet sheet = Sheet.createDefault();
+// Sheet.Set set = Sheet.createPropertiesSet();
+ Sorties sortie = getLookup().lookup(Sorties.class);
+ CrueConfigMetier ccm = getLookup().lookup(CrueConfigMetier.class);
+ sheet.put(createAvancementSheet(sortie, ccm));
+ sheet.put(createResultatSheet(sortie, ccm));
+ sheet.put(createTraceSheet(sortie, ccm));
+ return sheet;
+ }
+
+ protected Set createAvancementSheet(Sorties sortie, CrueConfigMetier ccm) {
+ Sheet.Set setAvancement = new Sheet.Set();
+ Avancement avancement = sortie.getAvancement();
+ setAvancement.setName("Avancement");
+ setAvancement.setDisplayName(NbBundle.getMessage(SortiesNode.class, "Avancement.DisplayName"));
+ PropertyNodeBuilder nodeBuilder = new PropertyNodeBuilder();
+ List<PropertySupportReflection> createFromPropertyDesc = nodeBuilder.createFromPropertyDesc(avancement, this);
+ for (PropertySupportReflection propertySupportReflection : createFromPropertyDesc) {
+ setAvancement.put(propertySupportReflection);
+ }
+ return setAvancement;
+ }
+
+ protected Set createResultatSheet(Sorties sortie, CrueConfigMetier ccm) {
+ Sheet.Set setResultat = new Sheet.Set();
+ Resultat resultat = sortie.getResultat();
+ setResultat.setName("Resultat");
+ setResultat.setDisplayName(NbBundle.getMessage(SortiesNode.class, "Resultat.DisplayName"));
+ PropertyNodeBuilder nodeBuilder = new PropertyNodeBuilder();
+ List<PropertySupportReflection> createFromPropertyDesc = nodeBuilder.createFromPropertyDesc(resultat, this);
+ for (PropertySupportReflection propertySupportReflection : createFromPropertyDesc) {
+ setResultat.put(propertySupportReflection);
+ }
+ return setResultat;
+ }
+
+ protected Set createTraceSheet(Sorties sortie, CrueConfigMetier ccm) {
+ Sheet.Set setTrace = new Sheet.Set();
+ Trace resultat = sortie.getTrace();
+ setTrace.setName("Trace");
+ setTrace.setDisplayName(NbBundle.getMessage(SortiesNode.class, "Trace.DisplayName"));
+ PropertyNodeBuilder nodeBuilder = new PropertyNodeBuilder();
+ List<PropertySupportReflection> createFromPropertyDesc = nodeBuilder.createFromPropertyDesc(resultat, this);
+ for (PropertySupportReflection propertySupportReflection : createFromPropertyDesc) {
+ String name = propertySupportReflection.getName();
+ if (Trace.PROP_VERBOSITE_ECRAN.equals(name) || Trace.PROP_VERBOSITE_FICHIER.equals(name)) {
+ PropertyNature propertyEnum = ccm.getPropertyEnum(SeveriteManager.VERBOSITE_ID);
+ List<ItemEnum> enumValues = propertyEnum.getEnumValues();
+ String[] values = new String[enumValues.size()];
+ for (int i = 0; i < values.length; i++) {
+ values[i] = enumValues.get(i).getName();
+ }
+ propertySupportReflection.setTags(values);
+ }
+ setTrace.put(propertySupportReflection);
+ }
+ return setTrace;
+ }
+}
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/calcul/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/calcul/Bundle.properties 2012-07-04 15:13:43 UTC (rev 7445)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/calcul/Bundle.properties 2012-07-04 15:39:00 UTC (rev 7446)
@@ -1 +1,4 @@
-AvancementNode.DisplayName=Avancement
\ No newline at end of file
+Avancement.DisplayName=Avancement
+Resultat.DisplayName=R\u00e9sultat
+Trace.DisplayName=Trace
+SortiesNode.DisplayName=Sorties
Modified: trunk/soft/fudaa-crue/ui-modelling/src/test/java/org/fudaa/fudaa/crue/modelling/calcul/PropertiesSheetTest.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/test/java/org/fudaa/fudaa/crue/modelling/calcul/PropertiesSheetTest.java 2012-07-04 15:13:43 UTC (rev 7445)
+++ trunk/soft/fudaa-crue/ui-modelling/src/test/java/org/fudaa/fudaa/crue/modelling/calcul/PropertiesSheetTest.java 2012-07-04 15:39:00 UTC (rev 7446)
@@ -4,7 +4,8 @@
*/
package org.fudaa.fudaa.crue.modelling.calcul;
-import org.fudaa.dodico.crue.metier.emh.Avancement;
+import org.fudaa.dodico.crue.config.TestCrueConfigMetierLoaderDefault;
+import org.fudaa.dodico.crue.metier.emh.Sorties;
import org.fudaa.fudaa.crue.modelling.ModellingTestHelper;
import org.openide.explorer.propertysheet.PropertySheet;
import org.openide.nodes.Node;
@@ -16,8 +17,7 @@
public class PropertiesSheetTest {
public static void main(String[] args) {
- Avancement avancement = new Avancement();
- SortieNode node = new SortieNode(avancement, null);
+ SortiesNode node = new SortiesNode(new Sorties(), TestCrueConfigMetierLoaderDefault.DEFAULT, null);
PropertySheet sheet = new PropertySheet();
sheet.setNodes(new Node[]{node});
ModellingTestHelper.display(sheet);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|