This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit ea6a817910928f50235e3bde485cc7ab1deb24c6 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Sep 23 09:36:59 2016 +0200 [GEAR] Affichage des valeurs 0 dans les caractéristiques de type Entier (Fixes #8553) --- application-swing/pom.xml | 4 ++++ .../GearUseFeatureMeasurementCellEditor.java | 13 ++++++------ .../GearUseFeatureMeasurementCellRenderer.java | 24 +++++++++------------- .../longline/GearUseFeaturesLonglineUIHandler.java | 4 ++-- .../impl/seine/GearUseFeaturesSeineUIHandler.java | 2 ++ pom.xml | 6 ++++++ 6 files changed, 30 insertions(+), 23 deletions(-) diff --git a/application-swing/pom.xml b/application-swing/pom.xml index e0be63b..8685bfa 100644 --- a/application-swing/pom.xml +++ b/application-swing/pom.xml @@ -168,6 +168,10 @@ </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-widgets-number</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton.jaxx</groupId> <artifactId>jaxx-widgets-about</artifactId> </dependency> <dependency> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeatureMeasurementCellEditor.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/GearUseFeatureMeasurementCellEditor.java similarity index 90% rename from application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeatureMeasurementCellEditor.java rename to application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/GearUseFeatureMeasurementCellEditor.java index 7b4f2f4..cb59697 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeatureMeasurementCellEditor.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/GearUseFeatureMeasurementCellEditor.java @@ -1,4 +1,4 @@ -package fr.ird.observe.application.swing.ui.content.table.impl.seine; +package fr.ird.observe.application.swing.ui.content.table.impl; /* * #%L @@ -25,8 +25,7 @@ package fr.ird.observe.application.swing.ui.content.table.impl.seine; import fr.ird.observe.services.dto.referential.GearCaracteristicDto; import fr.ird.observe.services.dto.referential.GearCaracteristicTypeDtos; import fr.ird.observe.services.dto.referential.ReferentialReference; -import jaxx.runtime.swing.JAXXWidgetUtil; -import jaxx.runtime.swing.editor.cell.NumberCellEditor; +import org.nuiton.jaxx.widgets.number.NumberCellEditor; import javax.swing.JTable; import javax.swing.border.LineBorder; @@ -110,7 +109,7 @@ public class GearUseFeatureMeasurementCellEditor implements TableCellEditor { } { // entier signé - NumberCellEditor<Integer> editor = JAXXWidgetUtil.newNumberTableCellEditor(Integer.class, true); + NumberCellEditor editor = new NumberCellEditor<>(Integer.class, true); editor.getNumberEditor().setSelectAllTextOnError(true); editor.getNumberEditor().setNumberPattern("\\d{0,6}?"); editor.getNumberEditor().getTextField().setBorder(new LineBorder(Color.GRAY, 2)); @@ -118,7 +117,7 @@ public class GearUseFeatureMeasurementCellEditor implements TableCellEditor { } { // décimal signé - NumberCellEditor<Float> editor = JAXXWidgetUtil.newNumberTableCellEditor(Float.class, true); + NumberCellEditor editor = new NumberCellEditor<>(Float.class, true); editor.getNumberEditor().setSelectAllTextOnError(true); editor.getNumberEditor().setNumberPattern("\\d{0,6}(\\.\\d{0,4})?"); editor.getNumberEditor().getTextField().setBorder(new LineBorder(Color.GRAY, 2)); @@ -126,7 +125,7 @@ public class GearUseFeatureMeasurementCellEditor implements TableCellEditor { } { // entier non signé - NumberCellEditor<Integer> editor = JAXXWidgetUtil.newNumberTableCellEditor(Integer.class, false); + NumberCellEditor editor = new NumberCellEditor<>(Integer.class, false); editor.getNumberEditor().setSelectAllTextOnError(true); editor.getNumberEditor().setNumberPattern("\\d{0,6}?"); editor.getNumberEditor().getTextField().setBorder(new LineBorder(Color.GRAY, 2)); @@ -134,7 +133,7 @@ public class GearUseFeatureMeasurementCellEditor implements TableCellEditor { } { // décimal non signé - NumberCellEditor<Float> editor = JAXXWidgetUtil.newNumberTableCellEditor(Float.class, false); + NumberCellEditor editor = new NumberCellEditor<>(Float.class, false); editor.getNumberEditor().setSelectAllTextOnError(true); editor.getNumberEditor().setNumberPattern("\\d{0,6}(\\.\\d{0,4})?"); editor.getNumberEditor().getTextField().setBorder(new LineBorder(Color.GRAY, 2)); diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeatureMeasurementCellRenderer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/GearUseFeatureMeasurementCellRenderer.java similarity index 76% rename from application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeatureMeasurementCellRenderer.java rename to application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/GearUseFeatureMeasurementCellRenderer.java index 18cc610..a854b76 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeatureMeasurementCellRenderer.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/GearUseFeatureMeasurementCellRenderer.java @@ -1,4 +1,4 @@ -package fr.ird.observe.application.swing.ui.content.table.impl.seine; +package fr.ird.observe.application.swing.ui.content.table.impl; /* * #%L @@ -22,10 +22,10 @@ package fr.ird.observe.application.swing.ui.content.table.impl.seine; * #L% */ +import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.services.dto.referential.GearCaracteristicDto; import fr.ird.observe.services.dto.referential.GearCaracteristicTypeDtos; import fr.ird.observe.services.dto.referential.ReferentialReference; -import fr.ird.observe.application.swing.ui.UIHelper; import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer; @@ -54,33 +54,29 @@ public class GearUseFeatureMeasurementCellRenderer implements TableCellRenderer { // texte - TableCellRenderer editor = UIHelper.newStringTableCellRenderer(renderer, 10, true); - renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1", editor); + TableCellRenderer cellRenderer = UIHelper.newStringTableCellRenderer(renderer, 10, true); + renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.1", cellRenderer); } { // boolean - TableCellRenderer editor = UIHelper.newBooleanTableCellRenderer(renderer); - renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2", editor); + TableCellRenderer cellRenderer = UIHelper.newBooleanTableCellRenderer(renderer); + renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.2", cellRenderer); } { // entier signé - TableCellRenderer editor = UIHelper.newEmptyNumberTableCellRenderer(renderer); - renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.3", editor); + renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.3", renderer); } { // décimal signé - TableCellRenderer editor = UIHelper.newEmptyNumberTableCellRenderer(renderer); - renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.4", editor); + renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.4", renderer); } { // entier non signé - TableCellRenderer editor = UIHelper.newEmptyNumberTableCellRenderer(renderer); - renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5", editor); + renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.5", renderer); } { // décimal non signé - TableCellRenderer editor = UIHelper.newEmptyNumberTableCellRenderer(renderer); - renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.6", editor); + renderersByCaracteristicTypeId.put("fr.ird.observe.entities.referentiel.GearCaracteristicType#1239832686123#0.6", renderer); } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUIHandler.java index b2a2540..4cb86ab 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUIHandler.java @@ -32,8 +32,8 @@ import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.content.ContentMode; import fr.ird.observe.application.swing.ui.content.ContentUIInitializer; import fr.ird.observe.application.swing.ui.content.table.ContentTableUIHandler; -import fr.ird.observe.application.swing.ui.content.table.impl.seine.GearUseFeatureMeasurementCellEditor; -import fr.ird.observe.application.swing.ui.content.table.impl.seine.GearUseFeatureMeasurementCellRenderer; +import fr.ird.observe.application.swing.ui.content.table.impl.GearUseFeatureMeasurementCellEditor; +import fr.ird.observe.application.swing.ui.content.table.impl.GearUseFeatureMeasurementCellRenderer; import fr.ird.observe.services.dto.Form; import fr.ird.observe.services.dto.longline.GearUseFeaturesLonglineDto; import fr.ird.observe.services.dto.longline.GearUseFeaturesMeasurementLonglineDto; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUIHandler.java index 2df6166..fb8f4a8 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUIHandler.java @@ -32,6 +32,8 @@ import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.content.ContentMode; import fr.ird.observe.application.swing.ui.content.ContentUIInitializer; import fr.ird.observe.application.swing.ui.content.table.ContentTableUIHandler; +import fr.ird.observe.application.swing.ui.content.table.impl.GearUseFeatureMeasurementCellEditor; +import fr.ird.observe.application.swing.ui.content.table.impl.GearUseFeatureMeasurementCellRenderer; import fr.ird.observe.services.dto.Form; import fr.ird.observe.services.dto.referential.GearCaracteristicDto; import fr.ird.observe.services.dto.referential.GearCaracteristicTypeDtos; diff --git a/pom.xml b/pom.xml index 87e3d81..404bebf 100644 --- a/pom.xml +++ b/pom.xml @@ -441,6 +441,12 @@ </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-widgets-number</artifactId> + <version>${jaxxVersion}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.nuiton.jaxx</groupId> <artifactId>jaxx-config</artifactId> <version>${jaxxVersion}</version> <scope>compile</scope> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.