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 fa95e7de799b20d1679c1714a9b10c9456bcbedb Author: Tony CHEMIT <dev@tchemit.fr> Date: Sat Dec 31 18:50:51 2016 +0100 [iso] use jaxx 3.0-alpha-2 --- application-swing/pom.xml | 30 ++--- .../src/main/filters/observe-ui.properties | 5 + .../ObserveSwingApplicationDataSourcesManager.java | 2 +- .../application/swing/ObserveTextGenerator.java | 3 +- .../application/swing/ui/ObserveCommon.jcss | 36 +++++- .../application/swing/ui/ObserveMainUI.jaxx | 2 +- .../swing/ui/ObserveMainUIInitializer.java | 2 +- .../ird/observe/application/swing/ui/UIHelper.java | 26 +++- .../ui/actions/menu/config/ShowConfigAction.java | 12 +- .../menu/storage/StartServerModeAction.java | 2 +- .../swing/ui/admin/report/ReportUIHandler.java | 2 +- .../referential/legacy/SynchronizeUIHandler.java | 2 +- .../referential/ng/ReferentialReplaceUI.jaxx | 2 +- .../ng/ReferentialReplaceUIHandler.java | 2 +- .../swing/ui/content/ContentUIBlockingLayerUI.java | 10 +- .../swing/ui/content/ContentUIHandler.java | 15 ++- .../swing/ui/content/ContentUIInitializer.java | 130 +++++-------------- .../ui/content/DataReferenceListCellRenderer.java | 54 ++++++++ .../swing/ui/content/ObserveFocusManager.java | 4 +- .../ReferentialReferenceListCellRenderer.java | 70 ++++++++++ .../ui/content/impl/longline/BranchlineUI.jaxx | 10 +- .../ui/content/impl/longline/BranchlineUI.jcss | 9 +- .../content/impl/longline/BranchlineUIHandler.java | 6 +- .../ui/content/impl/longline/SetLonglineUI.jaxx | 32 ++--- .../ui/content/impl/longline/SetLonglineUI.jcss | 44 ++----- .../impl/longline/SetLonglineUIHandler.java | 34 ++--- .../FloatingObjectTransmittingBuoyOperationUI.jaxx | 2 +- .../ui/content/impl/seine/FloatingObjectUI.jaxx | 6 +- .../ui/content/impl/seine/FloatingObjectUI.jcss | 5 +- .../impl/seine/FloatingObjectUIHandler.java | 2 +- .../swing/ui/content/impl/seine/SetSeineUI.jaxx | 18 +-- .../swing/ui/content/impl/seine/SetSeineUI.jcss | 22 +--- .../ui/content/impl/seine/SetSeineUIHandler.java | 16 +-- .../swing/ui/content/list/ContentListUI.jaxx | 2 +- .../ui/content/list/ContentListUIHandler.java | 2 +- .../open/impl/longline/ActivityLonglineUI.jaxx | 6 +- .../open/impl/longline/ActivityLonglineUI.jcss | 4 +- .../impl/longline/ActivityLonglineUIHandler.java | 2 +- .../content/open/impl/longline/TripLonglineUI.jaxx | 6 +- .../content/open/impl/longline/TripLonglineUI.jcss | 10 +- .../open/impl/longline/TripLonglineUIHandler.java | 2 +- .../content/open/impl/seine/ActivitySeineUI.jaxx | 10 +- .../content/open/impl/seine/ActivitySeineUI.jcss | 12 +- .../open/impl/seine/ActivitySeineUIHandler.java | 4 +- .../swing/ui/content/open/impl/seine/RouteUI.jaxx | 6 +- .../swing/ui/content/open/impl/seine/RouteUI.jcss | 6 +- .../ui/content/open/impl/seine/RouteUIHandler.java | 2 +- .../ui/content/open/impl/seine/TripSeineUI.jaxx | 4 +- .../swing/ui/content/ref/ContentReferenceUI.jaxx | 2 +- .../ui/content/ref/ContentReferenceUIHandler.java | 2 +- .../ui/content/ref/impl/GearCaracteristicUI.jaxx | 2 +- .../swing/ui/content/ref/impl/HarbourUI.jaxx | 2 +- .../content/ref/impl/LengthLengthParameterUI.jaxx | 4 +- .../content/ref/impl/LengthWeightParameterUI.jaxx | 4 +- .../content/ref/impl/LengthWeightParameterUI.jcss | 4 +- .../swing/ui/content/ref/impl/OrganismUI.jaxx | 2 +- .../swing/ui/content/ref/impl/PersonUI.jaxx | 2 +- .../swing/ui/content/ref/impl/ProgramUI.jaxx | 2 +- .../swing/ui/content/ref/impl/ShipOwnerUI.jaxx | 2 +- .../swing/ui/content/ref/impl/SpeciesGroupUI.jaxx | 2 +- .../swing/ui/content/ref/impl/SpeciesUI.jaxx | 4 +- .../swing/ui/content/ref/impl/SpeciesUI.jcss | 8 +- .../swing/ui/content/ref/impl/VesselUI.jaxx | 12 +- .../swing/ui/content/ref/impl/VesselUI.jcss | 14 +- .../swing/ui/content/ref/impl/VesselUIModel.java | 14 +- .../content/ref/impl/seine/WeightCategoryUI.jaxx | 2 +- .../ui/content/ref/usage/UsageForDeleteUI.jaxx | 2 +- .../content/ref/usage/UsageForDeleteUIHandler.java | 2 +- .../content/ref/usage/UsageForDesactivateUI.jaxx | 2 +- .../ref/usage/UsageForDesactivateUIHandler.java | 2 +- .../ref/usage/UsageForDisplayUIHandler.java | 2 +- .../content/ref/usage/UsageUIHandlerSupport.java | 2 +- .../content/table/ContentTableUIInitializer.java | 14 +- .../table/impl/longline/BaitsCompositionUI.jaxx | 10 +- .../table/impl/longline/BaitsCompositionUI.jcss | 9 +- .../impl/longline/BranchlinesCompositionUI.jaxx | 10 +- .../impl/longline/BranchlinesCompositionUI.jcss | 9 +- .../CatchLonglineContentTableUIInitializer.java | 4 +- .../table/impl/longline/CatchLonglineUI.jaxx | 12 +- .../table/impl/longline/CatchLonglineUI.jcss | 12 +- .../content/table/impl/longline/EncounterUI.jaxx | 8 +- .../content/table/impl/longline/EncounterUI.jcss | 6 +- .../impl/longline/FloatlinesCompositionUI.jaxx | 8 +- .../impl/longline/FloatlinesCompositionUI.jcss | 6 +- .../impl/longline/GearUseFeaturesLonglineUI.jaxx | 6 +- .../impl/longline/GearUseFeaturesLonglineUI.jcss | 3 +- .../table/impl/longline/HooksCompositionUI.jaxx | 8 +- .../table/impl/longline/HooksCompositionUI.jcss | 6 +- .../impl/longline/LonglinePositionHelper.java | 2 +- .../content/table/impl/longline/SensorUsedUI.jaxx | 2 +- .../table/impl/longline/SensorUsedUIHandler.java | 2 +- .../ui/content/table/impl/longline/TdrUI.jaxx | 8 +- .../ui/content/table/impl/longline/TdrUI.jcss | 22 ++-- .../content/table/impl/longline/TdrUIHandler.java | 4 +- .../content/table/impl/seine/AbstractSampleUI.jcss | 7 +- .../table/impl/seine/GearUseFeaturesSeineUI.jaxx | 6 +- .../table/impl/seine/GearUseFeaturesSeineUI.jcss | 3 +- .../content/table/impl/seine/NonTargetCatchUI.jaxx | 12 +- .../content/table/impl/seine/NonTargetCatchUI.jcss | 13 +- .../table/impl/seine/NonTargetSampleUI.jaxx | 10 +- .../table/impl/seine/NonTargetSampleUI.jcss | 3 +- .../table/impl/seine/ObjectObservedSpeciesUI.jaxx | 6 +- .../table/impl/seine/ObjectObservedSpeciesUI.jcss | 3 +- .../table/impl/seine/ObjectSchoolEstimateUI.jaxx | 6 +- .../table/impl/seine/ObjectSchoolEstimateUI.jcss | 3 +- .../content/table/impl/seine/SchoolEstimateUI.jaxx | 8 +- .../content/table/impl/seine/SchoolEstimateUI.jcss | 6 +- .../ui/content/table/impl/seine/TargetCatchUI.jaxx | 6 +- .../ui/content/table/impl/seine/TargetCatchUI.jcss | 4 +- .../table/impl/seine/TargetCatchUIHandler.java | 2 +- .../table/impl/seine/TargetDiscardCatchUI.jaxx | 6 +- .../table/impl/seine/TargetDiscardCatchUI.jcss | 4 +- .../impl/seine/TargetDiscardCatchUIHandler.java | 2 +- .../content/table/impl/seine/TargetSampleUI.jaxx | 10 +- .../content/table/impl/seine/TargetSampleUI.jcss | 3 +- .../swing/ui/storage/presets/RemotePresetsUI.jaxx | 2 +- .../ui/storage/presets/RemotePresetsUIHandler.java | 2 +- .../ui/util/table/EditableTableModelSupport.java | 2 +- .../swing/validation/ObserveSwingValidator.java | 2 +- pom.xml | 25 ++-- services/pom.xml | 6 - .../observe/services/dto/AbstractObserveDto.java | 4 +- .../dto/referential/ReferentialMultimap.java | 141 ++++++++++----------- .../fr/ird/observe/services/gson/ClassAdapter.java | 4 +- 124 files changed, 645 insertions(+), 628 deletions(-) diff --git a/application-swing/pom.xml b/application-swing/pom.xml index 92d946f..ece44e7 100644 --- a/application-swing/pom.xml +++ b/application-swing/pom.xml @@ -37,22 +37,12 @@ <properties> <!-- jaxx configuration --> - <jaxx.addProjectClassPath>true</jaxx.addProjectClassPath> - <jaxx.addSourcesToClassPath>true</jaxx.addSourcesToClassPath> - <jaxx.defaultErrorUIFQN> - org.nuiton.jaxx.validator.swing.ui.ImageValidationUI - </jaxx.defaultErrorUIFQN> - <jaxx.useUIManagerForIcon>true</jaxx.useUIManagerForIcon> - <jaxx.autoImportCss>true</jaxx.autoImportCss> - <jaxx.autoRecurseInCss>false</jaxx.autoRecurseInCss> <jaxx.validatorFactoryFQN> fr.ird.observe.application.swing.validation.ObserveSwingValidator </jaxx.validatorFactoryFQN> <jaxx.commonCss> ${project.basedir}/src/main/java/fr/ird/observe/application/swing/ui/ObserveCommon.jcss </jaxx.commonCss> - <jaxx.cssExtension>jcss</jaxx.cssExtension> - <jaxx.addAutoHandlerUI>true</jaxx.addAutoHandlerUI> <!-- main class in JAR --> <maven.jar.main.class>fr.ird.observe.application.swing.RunObserve</maven.jar.main.class> @@ -152,7 +142,11 @@ </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-widgets</artifactId> + <artifactId>jaxx-widgets-error</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-widgets-hidor</artifactId> </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> @@ -164,23 +158,27 @@ </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-widgets-select</artifactId> + <artifactId>jaxx-widgets-file</artifactId> </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-widgets-number</artifactId> + <artifactId>jaxx-widgets-status</artifactId> </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-widgets-about</artifactId> + <artifactId>jaxx-widgets-select</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-widgets-number</artifactId> </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-config</artifactId> + <artifactId>jaxx-widgets-about</artifactId> </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-application-api</artifactId> + <artifactId>jaxx-widgets-config</artifactId> </dependency> <!-- commons dependencies --> diff --git a/application-swing/src/main/filters/observe-ui.properties b/application-swing/src/main/filters/observe-ui.properties index ca42153..fc35c5f 100644 --- a/application-swing/src/main/filters/observe-ui.properties +++ b/application-swing/src/main/filters/observe-ui.properties @@ -81,6 +81,11 @@ icon.action.add=action-add.png icon.action.bean-sort=action-bean-sort.png icon.action.bean-sort-up=action-bean-sort-up.png icon.action.bean-sort-down=action-bean-sort-down.png +icon.action.config-quit=action-config-quit.png +icon.action.config-save=action-config-save.png +icon.action.config-reset=action-config-reset.png +icon.action.config-reset-option=action-config-reset-option.png +icon.action.config-copy=action-config-copy.png #icon.action.calculator=action-calculator.png icon.action.cancel=action-cancel.png diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java index f8e1c5e..ba8de2b 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java @@ -57,7 +57,7 @@ import static fr.ird.observe.application.swing.configuration.ObserveSwingApplica import static fr.ird.observe.application.swing.ui.UIHelper.askUser; import static fr.ird.observe.application.swing.ui.UIHelper.displayInfo; import static fr.ird.observe.application.swing.ui.UIHelper.handlingError; -import static org.nuiton.jaxx.runtime.swing.editor.bean.BeanUIUtil.PopupHandler.log; +import static org.nuiton.jaxx.widgets.select.BeanUIUtil.PopupHandler.log; import static org.nuiton.i18n.I18n.n; import static org.nuiton.i18n.I18n.t; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveTextGenerator.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveTextGenerator.java index e7dde51..433ab34 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveTextGenerator.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveTextGenerator.java @@ -29,7 +29,6 @@ import fr.ird.observe.services.configuration.ObserveDataSourceInformation; import freemarker.cache.ClassTemplateLoader; import freemarker.template.Configuration; import freemarker.template.Template; -import org.nuiton.jaxx.application.ApplicationTechnicalException; import java.io.StringWriter; import java.io.Writer; @@ -111,7 +110,7 @@ public class ObserveTextGenerator { } catch (Exception ex) { - throw new ApplicationTechnicalException(t("observe.generateHtml.error", templateName), ex); + throw new ObserveSwingTechnicalException(t("observe.generateHtml.error", templateName), ex); } } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveCommon.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveCommon.jcss index 9806a39..91d62a4 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveCommon.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveCommon.jcss @@ -82,15 +82,45 @@ BlockingLayerUI { .integer { numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; - useFloat:false; + numberType:{Integer.class}; +} + +.int6 { + numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberType:{Integer.class}; +} + +.int7 { + numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_7_DIGITS_PATTERN}; + numberType:{Integer.class}; +} + +.long10 { + numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.LONG_10_DIGITS_PATTERN}; + numberType:{Long.class}; } .float { numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; - useFloat:true; + numberType:{Float.class}; +} + +.float1 { + numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL1_PATTERN}; + numberType:{Float.class}; } .float2 { numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; - useFloat:true; + numberType:{Float.class}; +} + +.float3 { + numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberType:{Float.class}; } + +.float4 { + numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL4_PATTERN}; + numberType:{Float.class}; +} \ No newline at end of file diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jaxx index b8d557b..9b499a9 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jaxx @@ -87,7 +87,7 @@ org.nuiton.jaxx.runtime.swing.CardLayout2 org.nuiton.jaxx.runtime.swing.CardLayout2Ext org.nuiton.jaxx.runtime.swing.BlockingLayerUI - org.nuiton.jaxx.runtime.swing.StatusMessagePanel + org.nuiton.jaxx.widgets.status.StatusMessagePanel org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel org.jdesktop.swingx.JXTitledPanel diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIInitializer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIInitializer.java index c0a3163..612ec85 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIInitializer.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIInitializer.java @@ -42,7 +42,7 @@ import fr.ird.observe.application.swing.ui.util.ObserveSwingValidatorMessageTabl import fr.ird.observe.application.swing.ui.util.ObserveValidatorMessageTableRenderer; import fr.ird.observe.services.dto.constants.ReferentialLocale; import org.nuiton.jaxx.runtime.context.JAXXInitialContext; -import org.nuiton.jaxx.runtime.swing.ErrorDialogUI; +import org.nuiton.jaxx.widgets.error.ErrorDialogUI; import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel; import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; import org.apache.commons.logging.Log; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/UIHelper.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/UIHelper.java index 23e201a..d0d7280 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/UIHelper.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/UIHelper.java @@ -34,16 +34,17 @@ import fr.ird.observe.services.dto.DataFileDto; import fr.ird.observe.services.dto.IdDto; import fr.ird.observe.services.dto.referential.ReferentialDto; import fr.ird.observe.services.security.InvalidAuthenticationTokenException; +import org.apache.commons.beanutils.PropertyUtils; import org.nuiton.jaxx.runtime.JAXXObject; import org.nuiton.jaxx.runtime.SwingUtil; -import org.nuiton.jaxx.runtime.swing.ErrorDialogUI; +import org.nuiton.jaxx.widgets.error.ErrorDialogUI; import org.nuiton.jaxx.runtime.swing.renderer.DecoratorTableCellRenderer; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.painter.Painter; import org.nuiton.decorator.Decorator; -import org.nuiton.jaxx.runtime.JaxxFileChooser; +import org.nuiton.jaxx.widgets.file.JaxxFileChooser; import javax.swing.JComponent; import javax.swing.JDialog; @@ -70,6 +71,7 @@ import java.beans.PropertyChangeListener; import java.io.File; import java.io.IOException; import java.util.Arrays; +import java.util.Objects; import static javax.swing.JOptionPane.CLOSED_OPTION; import static javax.swing.JOptionPane.VALUE_PROPERTY; @@ -637,4 +639,24 @@ public class UIHelper extends SwingUtil { SwingUtilities.invokeLater(component::requestFocusInWindow); } } + + public static void setProperty(Object bean, String property, Object value) { + Objects.requireNonNull(bean); + Objects.requireNonNull(property); + try { + PropertyUtils.setSimpleProperty(bean, property, value); + } catch (Exception e) { + throw new ObserveSwingTechnicalException(String.format("Could not set property %1s not found on object of type %2s", property, bean.getClass().getName()), e); + } + } + + public static Object getProperty(Object bean, String property) { + Objects.requireNonNull(bean); + Objects.requireNonNull(property); + try { + return PropertyUtils.getSimpleProperty(bean, property); + } catch (Exception e) { + throw new ObserveSwingTechnicalException(String.format("Could not get property %1s on object of type %2s", property, bean.getClass().getName()), e); + } + } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/config/ShowConfigAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/config/ShowConfigAction.java index d4c1d27..9da52fa 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/config/ShowConfigAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/config/ShowConfigAction.java @@ -35,17 +35,17 @@ import fr.ird.observe.application.swing.ui.ObserveUIMode; import fr.ird.observe.application.swing.ui.actions.AbstractUIAction; import fr.ird.observe.services.dto.reference.ReferentialReference; import fr.ird.observe.services.dto.referential.SpeciesListDto; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanFilterableComboBox; +import org.nuiton.jaxx.widgets.select.BeanFilterableComboBox; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.renderer.DefaultTableRenderer; import org.nuiton.config.ConfigOptionDef; import org.nuiton.decorator.Decorator; -import org.nuiton.jaxx.config.ConfigCategoryUI; -import org.nuiton.jaxx.config.ConfigUI; -import org.nuiton.jaxx.config.ConfigUIHelper; -import org.nuiton.jaxx.config.model.ConfigUIModelBuilder; -import org.nuiton.jaxx.config.model.MainCallBackFinalizer; +import org.nuiton.jaxx.widgets.config.ConfigCategoryUI; +import org.nuiton.jaxx.widgets.config.ConfigUI; +import org.nuiton.jaxx.widgets.config.ConfigUIHelper; +import org.nuiton.jaxx.widgets.config.model.ConfigUIModelBuilder; +import org.nuiton.jaxx.widgets.config.model.MainCallBackFinalizer; import javax.swing.DefaultCellEditor; import javax.swing.Icon; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/storage/StartServerModeAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/storage/StartServerModeAction.java index 2922894..d90cf32 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/storage/StartServerModeAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/storage/StartServerModeAction.java @@ -27,7 +27,7 @@ import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationCon import fr.ird.observe.application.swing.ui.ObserveMainUI; import fr.ird.observe.application.swing.ui.ObserveUIMode; import fr.ird.observe.application.swing.ui.actions.AbstractUIAction; -import org.nuiton.jaxx.runtime.swing.ErrorDialogUI; +import org.nuiton.jaxx.widgets.error.ErrorDialogUI; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.h2.tools.Server; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/report/ReportUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/report/ReportUIHandler.java index 2e78f54..68e5115 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/report/ReportUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/report/ReportUIHandler.java @@ -38,7 +38,7 @@ import fr.ird.observe.services.service.actions.report.ReportService; import fr.ird.observe.services.service.actions.report.ReportVariable; import org.nuiton.jaxx.runtime.context.JAXXInitialContext; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/legacy/SynchronizeUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/legacy/SynchronizeUIHandler.java index 3b9a254..ce41471 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/legacy/SynchronizeUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/legacy/SynchronizeUIHandler.java @@ -40,7 +40,7 @@ import fr.ird.observe.services.service.actions.synchro.referential.legacy.Unidir import fr.ird.observe.services.service.actions.synchro.referential.legacy.UnidirectionalReferentialSynchronizeResult; import org.nuiton.jaxx.runtime.spi.UIHandler; import org.nuiton.jaxx.runtime.swing.CardLayout2; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import org.nuiton.jaxx.runtime.swing.model.JaxxDefaultListModel; import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState; import org.apache.commons.collections4.CollectionUtils; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUI.jaxx index 478f4f6..35e26e2 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUI.jaxx @@ -25,7 +25,7 @@ fr.ird.observe.services.dto.referential.ReferentialDto fr.ird.observe.services.dto.reference.ReferentialReference - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox </import> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUIHandler.java index e7dc99c..a48dafb 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/synchronize/referential/ng/ReferentialReplaceUIHandler.java @@ -26,7 +26,7 @@ import fr.ird.observe.application.swing.decoration.decorators.ReferentialReferen import fr.ird.observe.services.dto.reference.ReferentialReference; import fr.ird.observe.services.dto.referential.ReferentialDto; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import java.awt.Dimension; import java.beans.PropertyChangeListener; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIBlockingLayerUI.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIBlockingLayerUI.java index 47f3177..039f6de 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIBlockingLayerUI.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIBlockingLayerUI.java @@ -89,15 +89,16 @@ public class ContentUIBlockingLayerUI extends BlockingLayerUI { @Override protected void processKeyEvent(KeyEvent e, JXLayer<? extends JComponent> l) { - if (log.isInfoEnabled()) { - log.info(e); + if (!block) { + return; } + InputMap inputMap = ui.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); ActionMap actionMap = ui.getActionMap(); - boolean consumed = false; + boolean consumed = e.isConsumed(); - if (e.isControlDown() && e.getKeyChar() != '\uFFFF') { + if (!consumed && e.isControlDown() && e.getKeyChar() != '\uFFFF') { KeyStroke keyStroke = KeyStroke.getKeyStroke("ctrl pressed " + (char) e.getKeyCode()); @@ -132,7 +133,6 @@ public class ContentUIBlockingLayerUI extends BlockingLayerUI { consumed = doAction(keyStroke, inputMap, actionMap); } - } if (consumed) { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIHandler.java index 7482f6e..23e0fec 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIHandler.java @@ -53,18 +53,18 @@ import fr.ird.observe.services.dto.reference.ReferentialReference; import fr.ird.observe.services.dto.reference.ReferentialReferenceSet; import fr.ird.observe.services.dto.reference.ReferentialReferences; import fr.ird.observe.services.dto.referential.ReferentialDto; -import org.nuiton.jaxx.runtime.JAXXContext; -import org.nuiton.jaxx.runtime.context.DefaultJAXXContext; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanListHeader; -import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel; -import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.time.FastDateFormat; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.decorator.Decorator; import org.nuiton.decorator.DecoratorUtil; +import org.nuiton.jaxx.runtime.JAXXContext; +import org.nuiton.jaxx.runtime.context.DefaultJAXXContext; +import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel; +import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; +import org.nuiton.jaxx.widgets.select.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanListHeader; import org.nuiton.jaxx.widgets.select.FilterableDoubleList; import org.nuiton.validator.NuitonValidatorScope; @@ -97,6 +97,7 @@ import java.util.Locale; import java.util.Objects; import java.util.Optional; import java.util.Set; +import java.util.Vector; import static org.nuiton.i18n.I18n.t; @@ -982,7 +983,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U list.setData(data); list.putClientProperty("data", data); - list.getList().setListData(data.toArray()); + list.getList().setListData(new Vector<>(data)); } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java index e09cdcd..a618a1e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java @@ -31,6 +31,7 @@ import fr.ird.observe.application.swing.decoration.ObserveI18nDecoratorHelper; import fr.ird.observe.application.swing.decoration.decorators.DataReferenceDecorator; import fr.ird.observe.application.swing.decoration.decorators.ReferentialReferenceDecorator; import fr.ird.observe.application.swing.ui.ObserveKeyStrokes; +import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.actions.AbstractUIAction; import fr.ird.observe.application.swing.ui.actions.content.GoToSubTab1UIAction; import fr.ird.observe.application.swing.ui.actions.content.GoToSubTab2UIAction; @@ -47,7 +48,6 @@ import fr.ird.observe.application.swing.ui.util.tripMap.ObserveMapPane; import fr.ird.observe.application.swing.validation.ObserveSwingValidator; import fr.ird.observe.services.dto.DataDto; import fr.ird.observe.services.dto.IdDto; -import fr.ird.observe.services.dto.reference.AbstractReference; import fr.ird.observe.services.dto.reference.DataReference; import fr.ird.observe.services.dto.reference.ReferentialReference; import fr.ird.observe.services.dto.referential.ReferentialDto; @@ -59,15 +59,8 @@ import org.jdesktop.swingx.JXMonthView; import org.jdesktop.swingx.autocomplete.ComboBoxCellEditor; import org.jdesktop.swingx.autocomplete.ObjectToStringConverter; import org.nuiton.decorator.Decorator; -import org.nuiton.jaxx.application.bean.JavaBeanObjectUtil; import org.nuiton.jaxx.runtime.SwingUtil; -import org.nuiton.jaxx.runtime.swing.JAXXWidgetUtil; import org.nuiton.jaxx.runtime.swing.editor.EnumEditor; -import org.nuiton.jaxx.runtime.swing.editor.NumberEditor; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanListHeader; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanUIUtil; -import org.nuiton.jaxx.runtime.swing.editor.cell.NumberCellEditor; import org.nuiton.jaxx.runtime.swing.renderer.DecoratorListCellRenderer; import org.nuiton.jaxx.runtime.swing.renderer.EnumEditorRenderer; import org.nuiton.jaxx.validator.JAXXValidator; @@ -75,6 +68,11 @@ import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; import org.nuiton.jaxx.widgets.datetime.DateTimeEditor; import org.nuiton.jaxx.widgets.datetime.TimeEditor; import org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor; +import org.nuiton.jaxx.widgets.number.NumberCellEditor; +import org.nuiton.jaxx.widgets.number.NumberEditor; +import org.nuiton.jaxx.widgets.select.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanListHeader; +import org.nuiton.jaxx.widgets.select.BeanUIUtil; import org.nuiton.jaxx.widgets.select.FilterableDoubleList; import org.nuiton.util.DateUtil; @@ -154,7 +152,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> public static TableCellEditor newFloatColumnEditor() { - NumberCellEditor<Float> editor = JAXXWidgetUtil.newNumberTableCellEditor(Float.class, false); + NumberCellEditor<Float> editor = new NumberCellEditor<>(Float.class, false); editor.getNumberEditor().setSelectAllTextOnError(true); editor.getNumberEditor().getTextField().setBorder(new LineBorder(Color.GRAY, 2)); editor.getNumberEditor().setNumberPattern("\\d{0,6}(\\.\\d{0,4})?"); @@ -164,7 +162,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> public static TableCellEditor newIntegerColumnEditor() { - NumberCellEditor<Integer> editor = JAXXWidgetUtil.newNumberTableCellEditor(Integer.class, false); + NumberCellEditor<Integer> editor = new NumberCellEditor<>(Integer.class, false); editor.getNumberEditor().setSelectAllTextOnError(true); editor.getNumberEditor().getTextField().setBorder(new LineBorder(Color.GRAY, 2)); editor.getNumberEditor().setNumberPattern("\\d{0,4}?"); @@ -182,7 +180,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> public static <B> ComboBoxCellEditor newDataColumnEditor(JComboBox<B> comboBox, List<B> data, Decorator<B> decorator) { - comboBox.setRenderer(new DecoratorListCellRenderer(decorator)); + comboBox.setRenderer(new DecoratorListCellRenderer<>(decorator)); prepareComboBoxData(comboBox, data); @@ -340,7 +338,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> final String propertyName = (String) editor.getClientProperty(CLIENT_PROPERTY_RESET_PROPERTY_NAME); if (propertyName != null) { - editor.addActionListener(e -> JavaBeanObjectUtil.setProperty(getBean(), propertyName, null)); + editor.addActionListener(e -> UIHelper.setProperty(getBean(), propertyName, null)); } return; @@ -500,7 +498,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> if (source.isEditValid()) { try { Date newDate = simpleDateFormat.parse(editor.getDayDateEditor().getEditor().getText()); - Object oldValue = JavaBeanObjectUtil.getProperty(editor.getModel().getBean(), editor.getModel().getPropertyDayDate()); + Object oldValue = UIHelper.getProperty(editor.getModel().getBean(), editor.getModel().getPropertyDayDate()); if (!Objects.equals(oldValue, newDate)) { editor.getDayDateEditor().commitEdit(); if (log.isInfoEnabled()) { @@ -545,12 +543,12 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> JTextField source = (JTextField) e.getSource(); String text = source.getText(); text = text.isEmpty() ? null : text; - if (text == null && JavaBeanObjectUtil.getProperty(getBean(), propertyName) == null) { + if (text == null && UIHelper.getProperty(getBean(), propertyName) == null) { // On n'envoie pas la demande, car cela va modifier ensuite le formulaire // car avec oldValue=null et newValue=null, les pcs sont déclanchés... return; } - JavaBeanObjectUtil.setProperty(getBean(), propertyName, text); + UIHelper.setProperty(getBean(), propertyName, text); } }); } @@ -566,7 +564,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> public void keyReleased(KeyEvent e) { JTextArea source = (JTextArea) e.getSource(); String text = source.getText(); - JavaBeanObjectUtil.setProperty(getBean(), propertyName, text); + UIHelper.setProperty(getBean(), propertyName, text); } }); } @@ -626,7 +624,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> if (event.getStateChange() == ItemEvent.SELECTED) { Boolean newValue = ((BooleanEditor) event.getSource()).getBooleanValue(); - JavaBeanObjectUtil.setProperty(getBean(), propertyName, newValue); + UIHelper.setProperty(getBean(), propertyName, newValue); } }); } @@ -657,7 +655,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> if (propertyName != null) { editor.addItemListener(event -> { Boolean newValue = ((JCheckBox) event.getSource()).isSelected(); - JavaBeanObjectUtil.setProperty(getBean(), propertyName, newValue); + UIHelper.setProperty(getBean(), propertyName, newValue); }); } } @@ -680,12 +678,12 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> picker.addActionListener(e -> { JXDatePicker source = (JXDatePicker) e.getSource(); Date date = source.getDate(); - if (Objects.equals(date, JavaBeanObjectUtil.getProperty(getBean(), propertyName))) { + if (Objects.equals(date, UIHelper.getProperty(getBean(), propertyName))) { // On n'envoie pas la demande, car cela va modifier ensuite le formulaire // car avec oldValue=null et newValue=null, les pcs sont déclanchés... return; } - JavaBeanObjectUtil.setProperty(getBean(), propertyName, date); + UIHelper.setProperty(getBean(), propertyName, date); }); } @@ -762,11 +760,11 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> list.init(decorator, new ArrayList<>(), new ArrayList<>()); - JList<AbstractReference<D>> selectedList = list.getSelectedList(); - ListCellRenderer<? super AbstractReference<D>> renderer = selectedList.getCellRenderer(); + JList<DataReference<D>> selectedList = list.getSelectedList(); + ListCellRenderer<? super DataReference<D>> renderer = selectedList.getCellRenderer(); - selectedList.setCellRenderer(new ReferentielListCellRenderer<>(renderer)); - list.getUniverseList().setCellRenderer(new ReferentielListCellRenderer<>((ListCellRenderer<? super AbstractReference<IdDto>>) renderer)); + selectedList.setCellRenderer(new DataReferenceListCellRenderer<>(renderer)); + list.getUniverseList().setCellRenderer(new DataReferenceListCellRenderer<>(renderer)); } @@ -791,11 +789,11 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> list.init(decorator, new ArrayList<>(), new ArrayList<>()); - JList<AbstractReference<D>> selectedList = list.getSelectedList(); - ListCellRenderer<? super AbstractReference<D>> renderer = selectedList.getCellRenderer(); + JList<ReferentialReference<D>> selectedList = list.getSelectedList(); + ListCellRenderer<? super ReferentialReference<D>> renderer = selectedList.getCellRenderer(); - selectedList.setCellRenderer(new ReferentielListCellRenderer<>(renderer)); - list.getUniverseList().setCellRenderer(new ReferentielListCellRenderer<>((ListCellRenderer<? super AbstractReference<IdDto>>) renderer)); + selectedList.setCellRenderer(new ReferentialReferenceListCellRenderer<>(renderer)); + list.getUniverseList().setCellRenderer(new ReferentialReferenceListCellRenderer<>(renderer)); } @@ -820,9 +818,9 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> list.init(decorator, Collections.emptyList()); - JList<AbstractReference<D>> list1 = list.getList(); - ListCellRenderer<? super AbstractReference<D>> renderer = list1.getCellRenderer(); - list1.setCellRenderer(new ReferentielListCellRenderer<>(renderer)); + JList<DataReference<D>> list1 = list.getList(); + ListCellRenderer<? super DataReference<D>> renderer = list1.getCellRenderer(); + list1.setCellRenderer(new DataReferenceListCellRenderer<>(renderer)); } @@ -847,9 +845,9 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> list.init(decorator, Collections.emptyList()); - JList<AbstractReference<D>> list1 = list.getList(); - ListCellRenderer<? super AbstractReference<D>> renderer = list1.getCellRenderer(); - list1.setCellRenderer(new ReferentielListCellRenderer<>(renderer)); + JList<ReferentialReference<D>> list1 = list.getList(); + ListCellRenderer<? super ReferentialReference<D>> renderer = list1.getCellRenderer(); + list1.setCellRenderer(new ReferentialReferenceListCellRenderer<>(renderer)); } @@ -908,70 +906,6 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> return (Class<D>) clientProperty; } - /** - * Un renderer de liste d'entites d'un referentiel dans le quel on veut - * differencier les entites qui sont desactivees. - * - * @author Tony Chemit - dev@tchemit.fr - * @since 1.2 - */ - public static class ReferentielListCellRenderer<D extends IdDto> implements ListCellRenderer<AbstractReference<D>> { - - /** la couleur normal pour les entites non desactivees */ - protected Color normalColor; - - /** la couleur a utiliser pour les entites desactivees */ - protected Color disableColor = Color.LIGHT_GRAY; - - protected ListCellRenderer<? super AbstractReference<D>> delegate; - - public ReferentielListCellRenderer(ListCellRenderer<? super AbstractReference<D>> delegate) { - this.delegate = delegate; - } - - @Override - public Component getListCellRendererComponent(JList<? extends AbstractReference<D>> list, AbstractReference<D> value, int index, boolean isSelected, boolean cellHasFocus) { - JComponent comp; - comp = (JComponent) delegate.getListCellRendererComponent( - list, - value, - index, - isSelected, - cellHasFocus); - if (normalColor == null) { - // premiere fois, on intialise la couleur dite normale - normalColor = comp.getForeground(); - } - - String tip = null; - - // par defaut, on utilise la couleur normale - Color col = normalColor; - if (value != null) { - - boolean enabled = true; - - if (value instanceof ReferentialReference<?>) { - - ReferentialReference e = (ReferentialReference) value; - enabled = e.isEnabled(); - - } - - if (!enabled) { - // l'entite est desactivee - // on la grise pour bien la differencier - col = disableColor; - tip = t("observe.common.obsolete.entity", ((JLabel) comp).getText()); - } - } - comp.setForeground(col); - comp.setToolTipText(tip); - return comp; - } - - } - private static class ComboBoxListCellRenderer<E> implements ListCellRenderer<E> { private final ListCellRenderer<? super E> renderer; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/DataReferenceListCellRenderer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/DataReferenceListCellRenderer.java new file mode 100644 index 0000000..f4d1694 --- /dev/null +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/DataReferenceListCellRenderer.java @@ -0,0 +1,54 @@ +package fr.ird.observe.application.swing.ui.content; + +import fr.ird.observe.services.dto.DataDto; +import fr.ird.observe.services.dto.reference.AbstractReference; +import fr.ird.observe.services.dto.reference.DataReference; + +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.ListCellRenderer; +import java.awt.Color; +import java.awt.Component; + +/** + * Un renderer de liste d'entites d'un referentiel dans le quel on veut + * differencier les entites qui sont desactivees. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 1.2 + */ +public class DataReferenceListCellRenderer<D extends DataDto> implements ListCellRenderer<DataReference<D>> { + + /** la couleur normal pour les entites non desactivees */ + protected Color normalColor; + + /** la couleur a utiliser pour les entites desactivees */ + protected Color disableColor = Color.LIGHT_GRAY; + + protected ListCellRenderer<? super DataReference<D>> delegate; + + public DataReferenceListCellRenderer(ListCellRenderer<? super DataReference<D>> delegate) { + this.delegate = delegate; + } + + @Override + public Component getListCellRendererComponent(JList<? extends DataReference<D>> list, DataReference<D> value, int index, boolean isSelected, boolean cellHasFocus) { + JComponent comp; + comp = (JComponent) delegate.getListCellRendererComponent( + list, + value, + index, + isSelected, + cellHasFocus); + if (normalColor == null) { + // premiere fois, on intialise la couleur dite normale + normalColor = comp.getForeground(); + } + + // par defaut, on utilise la couleur normale + Color col = normalColor; + comp.setForeground(col); + return comp; + } + +} diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java index bde2485..6a64d12 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java @@ -69,8 +69,8 @@ import fr.ird.observe.application.swing.ui.content.table.impl.seine.TargetDiscar import fr.ird.observe.application.swing.ui.content.table.impl.seine.TargetSampleCaptureUI; import fr.ird.observe.application.swing.ui.content.table.impl.seine.TargetSampleRejeteUI; import fr.ird.observe.application.swing.ui.content.table.impl.seine.TargetSampleUI; -import org.nuiton.jaxx.runtime.swing.editor.NumberEditor; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.number.NumberEditor; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import org.jdesktop.swingx.JXDatePicker; import org.nuiton.jaxx.widgets.select.FilterableDoubleList; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ReferentialReferenceListCellRenderer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ReferentialReferenceListCellRenderer.java new file mode 100644 index 0000000..049bb57 --- /dev/null +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ReferentialReferenceListCellRenderer.java @@ -0,0 +1,70 @@ +package fr.ird.observe.application.swing.ui.content; + +import fr.ird.observe.services.dto.reference.ReferentialReference; +import fr.ird.observe.services.dto.referential.ReferentialDto; + +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.ListCellRenderer; +import java.awt.Color; +import java.awt.Component; + +import static org.nuiton.i18n.I18n.t; + +/** + * Un renderer de liste d'entites d'un referentiel dans le quel on veut + * differencier les entites qui sont desactivees. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 1.2 + */ +public class ReferentialReferenceListCellRenderer<D extends ReferentialDto> implements ListCellRenderer<ReferentialReference<D>> { + + /** la couleur normal pour les entites non desactivees */ + protected Color normalColor; + + /** la couleur a utiliser pour les entites desactivees */ + protected Color disableColor = Color.LIGHT_GRAY; + + protected ListCellRenderer<? super ReferentialReference<D>> delegate; + + public ReferentialReferenceListCellRenderer(ListCellRenderer<? super ReferentialReference<D>> delegate) { + this.delegate = delegate; + } + + @Override + public Component getListCellRendererComponent(JList<? extends ReferentialReference<D>> list, ReferentialReference<D> value, int index, boolean isSelected, boolean cellHasFocus) { + JComponent comp; + comp = (JComponent) delegate.getListCellRendererComponent( + list, + value, + index, + isSelected, + cellHasFocus); + if (normalColor == null) { + // premiere fois, on intialise la couleur dite normale + normalColor = comp.getForeground(); + } + + String tip = null; + + // par defaut, on utilise la couleur normale + Color col = normalColor; + if (value != null) { + + boolean enabled = value.isEnabled(); + + if (!enabled) { + // l'entite est desactivee + // on la grise pour bien la differencier + col = disableColor; + tip = t("observe.common.obsolete.entity", ((JLabel) comp).getText()); + } + } + comp.setForeground(col); + comp.setToolTipText(tip); + return comp; + } + +} diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jaxx index 2fc17f3..bbd27a2 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jaxx @@ -33,8 +33,8 @@ fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.datetime.DateTimeEditor org.nuiton.jaxx.widgets.datetime.TimeEditor @@ -147,7 +147,7 @@ public void edit(BranchlineDto branchline) { getHandler().edit(branchline); } <JLabel id='snapWeightLabel'/> </cell> <cell> - <NumberEditor id='snapWeight' constructorParams='this'/> + <NumberEditor id='snapWeight' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -161,7 +161,7 @@ public void edit(BranchlineDto branchline) { getHandler().edit(branchline); } <JLabel id='swivelWeightLabel'/> </cell> <cell> - <NumberEditor id='swivelWeight' constructorParams='this'/> + <NumberEditor id='swivelWeight' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -203,7 +203,7 @@ public void edit(BranchlineDto branchline) { getHandler().edit(branchline); } <JLabel id='hookOffsetLabel'/> </cell> <cell columns="2" weightx="1" fill="both"> - <NumberEditor id='hookOffset' constructorParams='this'/> + <NumberEditor id='hookOffset' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jcss index c890886..a57073b 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUI.jcss @@ -138,8 +138,7 @@ #swivelWeight { enabled:{BooleanUtils.isTrue(bean.getWeightedSwivel())}; property:{BranchlineDto.PROPERTY_SWIVEL_WEIGHT}; - model:{bean.getSwivelWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{bean.getSwivelWeight()}; _validatorLabel:{t("observe.content.branchline.swivelWeight")}; } @@ -159,8 +158,7 @@ #snapWeight { enabled:{BooleanUtils.isTrue(bean.getWeightedSnap())}; property:{BranchlineDto.PROPERTY_SNAP_WEIGHT}; - model:{bean.getSnapWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{bean.getSnapWeight()}; _validatorLabel:{t("observe.content.branchline.snapWeight")}; } @@ -202,8 +200,7 @@ #hookOffset { property:{BranchlineDto.PROPERTY_HOOK_OFFSET}; - model:{bean.getHookOffset()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getHookOffset()}; _validatorLabel:{t("observe.content.branchline.hookOffset")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUIHandler.java index b20a213..3110dcc 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/BranchlineUIHandler.java @@ -216,9 +216,9 @@ public class BranchlineUIHandler extends ContentUIHandler<BranchlineDto, Branchl BranchlineUI.BINDING_TRACE_CUT_OFF_SELECTED, BranchlineUI.BINDING_WEIGHTED_SWIVEL_SELECTED, - BranchlineUI.BINDING_SWIVEL_WEIGHT_MODEL, + BranchlineUI.BINDING_SWIVEL_WEIGHT_NUMBER_VALUE, BranchlineUI.BINDING_WEIGHTED_SNAP_SELECTED, - BranchlineUI.BINDING_SNAP_WEIGHT_MODEL, + BranchlineUI.BINDING_SNAP_WEIGHT_NUMBER_VALUE, BranchlineUI.BINDING_BAIT_TYPE_SELECTED_ITEM, BranchlineUI.BINDING_BAIT_SETTING_STATUS_SELECTED_ITEM, @@ -226,7 +226,7 @@ public class BranchlineUIHandler extends ContentUIHandler<BranchlineDto, Branchl BranchlineUI.BINDING_HOOK_TYPE_SELECTED_ITEM, BranchlineUI.BINDING_HOOK_SIZE_SELECTED_ITEM, - BranchlineUI.BINDING_HOOK_OFFSET_MODEL, + BranchlineUI.BINDING_HOOK_OFFSET_NUMBER_VALUE, BranchlineUI.BINDING_TIMER_SELECTED, BranchlineUI.BINDING_TIME_SINCE_CONTACT_TIME, diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jaxx index 27c1446..d35b66e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jaxx @@ -43,8 +43,8 @@ fr.ird.observe.application.swing.ui.util.BooleanEditor fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor org.nuiton.jaxx.widgets.datetime.DateTimeEditor @@ -118,7 +118,7 @@ <JLabel id='numberLabel'/> </cell> <cell columns="2" weightx="1" fill="both"> - <NumberEditor id='number' constructorParams='this'/> + <NumberEditor id='number' constructorParams='this' styleClass="int6"/> </cell> </row> @@ -181,7 +181,7 @@ <JLabel id='settingVesselSpeedLabel'/> </cell> <cell columns="3"> - <NumberEditor id='settingVesselSpeed' constructorParams='this'/> + <NumberEditor id='settingVesselSpeed' constructorParams='this' styleClass="float3"/> </cell> </row> <!-- time between hooks --> @@ -190,7 +190,7 @@ <JLabel id='timeBetweenHooksLabel'/> </cell> <cell fill='both' weightx="1" columns="3"> - <NumberEditor id='timeBetweenHooks' constructorParams='this'/> + <NumberEditor id='timeBetweenHooks' constructorParams='this' styleClass="long10"/> </cell> </row> <!-- shooter used --> @@ -203,7 +203,7 @@ <JLabel id='shooterSpeedLabel'/> </cell> <cell columns="2"> - <NumberEditor id='shooterSpeed' constructorParams='this'/> + <NumberEditor id='shooterSpeed' constructorParams='this' styleClass="float3"/> </cell> </row> <!-- max depth targeted (m) --> @@ -212,7 +212,7 @@ <JLabel id='maxDepthTargetedLabel'/> </cell> <cell columns="3"> - <NumberEditor id='maxDepthTargeted' constructorParams='this'/> + <NumberEditor id='maxDepthTargeted' constructorParams='this' styleClass="int6"/> </cell> </row> <!-- total section count --> @@ -221,7 +221,7 @@ <JLabel id='totalSectionsCountLabel'/> </cell> <cell fill='both' weightx="1" columns="3"> - <NumberEditor id='totalSectionsCount' constructorParams='this'/> + <NumberEditor id='totalSectionsCount' constructorParams='this' styleClass="int6"/> </cell> </row> <!-- basket per section count --> @@ -231,13 +231,13 @@ <JLabel id='basketsPerSectionCountLabel'/> </cell> <cell fill='both' weightx="1"> - <NumberEditor id='basketsPerSectionCount' constructorParams='this'/> + <NumberEditor id='basketsPerSectionCount' constructorParams='this' styleClass="int6"/> </cell> <cell anchor='west'> <JLabel id='totalBasketsCountLabel'/> </cell> <cell fill='both' weightx="1"> - <NumberEditor id='totalBasketsCount' constructorParams='this'/> + <NumberEditor id='totalBasketsCount' constructorParams='this' styleClass="int6"/> </cell> </row> <!-- branchlines per basket count --> @@ -247,13 +247,13 @@ <JLabel id='branchlinesPerBasketCountLabel'/> </cell> <cell fill='both' weightx="1"> - <NumberEditor id='branchlinesPerBasketCount' constructorParams='this'/> + <NumberEditor id='branchlinesPerBasketCount' constructorParams='this' styleClass="int6"/> </cell> <cell anchor='west'> <JLabel id='totalHooksCountLabel'/> </cell> <cell fill='both' weightx="1"> - <NumberEditor id='totalHooksCount' constructorParams='this'/> + <NumberEditor id='totalHooksCount' constructorParams='this' styleClass="int6"/> </cell> </row> <!-- line type --> @@ -277,7 +277,7 @@ <JLabel id='swivelWeightLabel'/> </cell> <cell columns="2"> - <NumberEditor id='swivelWeight' constructorParams='this'/> + <NumberEditor id='swivelWeight' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -291,7 +291,7 @@ <JLabel id='snapWeightLabel'/> </cell> <cell columns="2"> - <NumberEditor id='snapWeight' constructorParams='this'/> + <NumberEditor id='snapWeight' constructorParams='this' styleClass="float3"/> </cell> </row> <!-- ligtsticks per basket count --> @@ -300,7 +300,7 @@ <JLabel id='lightsticksPerBasketCountLabel'/> </cell> <cell fill='both' weightx="1" columns="3"> - <NumberEditor id='lightsticksPerBasketCount' constructorParams='this'/> + <NumberEditor id='lightsticksPerBasketCount' constructorParams='this' styleClass="int6"/> </cell> </row> <!-- lightsticks type --> @@ -383,7 +383,7 @@ <JLabel id='haulingBreaksLabel'/> </cell> <cell weightx="1" fill="both"> - <NumberEditor id='haulingBreaks' constructorParams='this'/> + <NumberEditor id='haulingBreaks' constructorParams='this' styleClass="int6"/> </cell> </row> </Table> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jcss index d8205ee..82ca8c3 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUI.jcss @@ -59,9 +59,7 @@ #number { property: {SetLonglineDto.PROPERTY_NUMBER}; - model:{bean.getNumber()}; - useFloat:false; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getNumber()}; _validatorLabel:{t("observe.content.setLongline.number")}; } @@ -123,8 +121,7 @@ #settingVesselSpeed { property:{SetLonglineDto.PROPERTY_SETTING_VESSEL_SPEED}; - model:{bean.getSettingVesselSpeed()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{bean.getSettingVesselSpeed()}; _validatorLabel:{t("observe.content.setLongline.settingVesselSpeed")}; } @@ -143,8 +140,7 @@ #shooterSpeed { enabled:{BooleanUtils.isTrue(bean.getShooterUsed())}; property:{SetLonglineDto.PROPERTY_SHOOTER_SPEED}; - model:{bean.getShooterSpeed()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{bean.getShooterSpeed()}; _validatorLabel:{t("observe.content.setLongline.shooterSpeed")}; } @@ -175,8 +171,7 @@ #swivelWeight { enabled:{BooleanUtils.isTrue(bean.getWeightedSwivel())}; property:{SetLonglineDto.PROPERTY_SWIVEL_WEIGHT}; - model:{bean.getSwivelWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{bean.getSwivelWeight()}; _validatorLabel:{t("observe.content.setLongline.swivelWeight")}; } @@ -196,8 +191,7 @@ #snapWeight { enabled:{BooleanUtils.isTrue(bean.getWeightedSnap())}; property:{SetLonglineDto.PROPERTY_SNAP_WEIGHT}; - model:{bean.getSnapWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{bean.getSnapWeight()}; _validatorLabel:{t("observe.content.setLongline.snapWeight")}; } @@ -219,8 +213,7 @@ #maxDepthTargeted { property:{SetLonglineDto.PROPERTY_MAX_DEPTH_TARGETED}; - model:{bean.getMaxDepthTargeted()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getMaxDepthTargeted()}; _validatorLabel:{t("observe.content.setLongline.maxDepthTargeted")}; } @@ -263,9 +256,7 @@ #timeBetweenHooks { property:{SetLonglineDto.PROPERTY_TIME_BETWEEN_HOOKS}; - model:{bean.getTimeBetweenHooks()}; - modelType:{Long.class}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.LONG_10_DIGITS_PATTERN}; + numberValue:{bean.getTimeBetweenHooks()}; _validatorLabel:{t("observe.content.setLongline.timeBetweenHooks")}; } @@ -276,8 +267,7 @@ #lightsticksPerBasketCount { property:{SetLonglineDto.PROPERTY_LIGHTSTICKS_PER_BASKET_COUNT}; - model:{bean.getLightsticksPerBasketCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getLightsticksPerBasketCount()}; _validatorLabel:{t("observe.content.setLongline.lightsticksPerBasketCount")}; } @@ -288,8 +278,7 @@ #basketsPerSectionCount { property:{SetLonglineDto.PROPERTY_BASKETS_PER_SECTION_COUNT}; - model:{bean.getBasketsPerSectionCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getBasketsPerSectionCount()}; _validatorLabel:{t("observe.content.setLongline.basketsPerSectionCount")}; } @@ -300,8 +289,7 @@ #totalBasketsCount { property:{SetLonglineDto.PROPERTY_TOTAL_BASKETS_COUNT}; - model:{bean.getTotalBasketsCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getTotalBasketsCount()}; _validatorLabel:{t("observe.content.setLongline.totalBasketsCount")}; } @@ -312,8 +300,7 @@ #branchlinesPerBasketCount { property:{SetLonglineDto.PROPERTY_BRANCHLINES_PER_BASKET_COUNT}; - model:{bean.getBranchlinesPerBasketCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getBranchlinesPerBasketCount()}; _validatorLabel:{t("observe.content.setLongline.branchlinesPerBasketCount")}; } @@ -324,8 +311,7 @@ #totalSectionsCount { property:{SetLonglineDto.PROPERTY_TOTAL_SECTIONS_COUNT}; - model:{bean.getTotalSectionsCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getTotalSectionsCount()}; _validatorLabel:{t("observe.content.setLongline.totalSectionsCount")}; } @@ -336,8 +322,7 @@ #totalHooksCount { property:{SetLonglineDto.PROPERTY_TOTAL_HOOKS_COUNT}; - model:{bean.getTotalHooksCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getTotalHooksCount()}; _validatorLabel:{t("observe.content.setLongline.totalHooksCount")}; } @@ -402,8 +387,7 @@ #haulingBreaks { property:{SetLonglineDto.PROPERTY_HAULING_BREAKS}; - model:{bean.getHaulingBreaks()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getHaulingBreaks()}; _validatorLabel:{t("observe.content.setLongline.haulingBreaks")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUIHandler.java index 3b16c85..70adff6 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/longline/SetLonglineUIHandler.java @@ -39,13 +39,13 @@ import fr.ird.observe.services.dto.longline.SetLonglineHelper; import fr.ird.observe.services.dto.reference.DataReference; import fr.ird.observe.services.dto.result.SaveResultDto; import fr.ird.observe.services.service.data.longline.SetLonglineService; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.HidorButton; +import org.nuiton.jaxx.widgets.hidor.HidorButton; import org.nuiton.jaxx.validator.swing.SwingValidatorMessage; import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel; import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.nuiton.jaxx.widgets.gis.CoordinateFormat; import org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditorModel; import org.nuiton.validator.NuitonValidatorScope; @@ -282,7 +282,7 @@ public class SetLonglineUIHandler extends ContentUIHandler<SetLonglineDto, SetLo // setting tab SetLonglineUI.BINDING_HOME_ID_TEXT, - SetLonglineUI.BINDING_NUMBER_MODEL, + SetLonglineUI.BINDING_NUMBER_NUMBER_VALUE, SetLonglineUI.BINDING_SETTING_START_TIME_STAMP_DATE, SetLonglineUI.BINDING_SETTING_START_COORDINATES_LATITUDE, @@ -293,26 +293,26 @@ public class SetLonglineUIHandler extends ContentUIHandler<SetLonglineDto, SetLo SetLonglineUI.BINDING_SETTING_END_COORDINATES_LONGITUDE, // setting caracteristics tab - SetLonglineUI.BINDING_SETTING_VESSEL_SPEED_MODEL, + SetLonglineUI.BINDING_SETTING_VESSEL_SPEED_NUMBER_VALUE, SetLonglineUI.BINDING_SHOOTER_USED_SELECTED, - SetLonglineUI.BINDING_SHOOTER_SPEED_MODEL, - SetLonglineUI.BINDING_TIME_BETWEEN_HOOKS_MODEL, + SetLonglineUI.BINDING_SHOOTER_SPEED_NUMBER_VALUE, + SetLonglineUI.BINDING_TIME_BETWEEN_HOOKS_NUMBER_VALUE, SetLonglineUI.BINDING_SETTING_SHAPE_SELECTED_ITEM, SetLonglineUI.BINDING_WEIGHTED_SWIVEL_SELECTED, - SetLonglineUI.BINDING_SWIVEL_WEIGHT_MODEL, + SetLonglineUI.BINDING_SWIVEL_WEIGHT_NUMBER_VALUE, SetLonglineUI.BINDING_WEIGHTED_SNAP_SELECTED, - SetLonglineUI.BINDING_SNAP_WEIGHT_MODEL, + SetLonglineUI.BINDING_SNAP_WEIGHT_NUMBER_VALUE, SetLonglineUI.BINDING_LINE_TYPE_SELECTED_ITEM, - SetLonglineUI.BINDING_MAX_DEPTH_TARGETED_MODEL, + SetLonglineUI.BINDING_MAX_DEPTH_TARGETED_NUMBER_VALUE, SetLonglineUI.BINDING_MONITORED_SELECTED, SetLonglineUI.BINDING_LIGHTSTICKS_TYPE_SELECTED_ITEM, SetLonglineUI.BINDING_LIGHTSTICKS_COLOR_SELECTED_ITEM, - SetLonglineUI.BINDING_LIGHTSTICKS_PER_BASKET_COUNT_MODEL, - SetLonglineUI.BINDING_BASKETS_PER_SECTION_COUNT_MODEL, - SetLonglineUI.BINDING_TOTAL_BASKETS_COUNT_MODEL, - SetLonglineUI.BINDING_BRANCHLINES_PER_BASKET_COUNT_MODEL, - SetLonglineUI.BINDING_TOTAL_SECTIONS_COUNT_MODEL, - SetLonglineUI.BINDING_TOTAL_HOOKS_COUNT_MODEL, + SetLonglineUI.BINDING_LIGHTSTICKS_PER_BASKET_COUNT_NUMBER_VALUE, + SetLonglineUI.BINDING_BASKETS_PER_SECTION_COUNT_NUMBER_VALUE, + SetLonglineUI.BINDING_TOTAL_BASKETS_COUNT_NUMBER_VALUE, + SetLonglineUI.BINDING_BRANCHLINES_PER_BASKET_COUNT_NUMBER_VALUE, + SetLonglineUI.BINDING_TOTAL_SECTIONS_COUNT_NUMBER_VALUE, + SetLonglineUI.BINDING_TOTAL_HOOKS_COUNT_NUMBER_VALUE, // hauling tab SetLonglineUI.BINDING_HAULING_DIRECTION_SAME_AS_SETTING_BOOLEAN_VALUE, @@ -325,7 +325,7 @@ public class SetLonglineUIHandler extends ContentUIHandler<SetLonglineDto, SetLo SetLonglineUI.BINDING_HAULING_END_COORDINATES_LATITUDE, SetLonglineUI.BINDING_HAULING_END_COORDINATES_LONGITUDE, - SetLonglineUI.BINDING_HAULING_BREAKS_MODEL); + SetLonglineUI.BINDING_HAULING_BREAKS_NUMBER_VALUE); model.setModified(create); diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectTransmittingBuoyOperationUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectTransmittingBuoyOperationUI.jaxx index eb3a43b..aedbd76 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectTransmittingBuoyOperationUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectTransmittingBuoyOperationUI.jaxx @@ -39,7 +39,7 @@ fr.ird.observe.application.swing.ui.actions.global.SaveDataGlobalUIAction fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx index da2a340..35b6954 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx @@ -37,8 +37,8 @@ fr.ird.observe.application.swing.ui.actions.global.SaveDataGlobalUIAction fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -93,7 +93,7 @@ <JLabel id='daysAtSeaCountLabel'/> </cell> <cell anchor='east' weightx="1"> - <NumberEditor id='daysAtSeaCount' constructorParams='this'/> + <NumberEditor id='daysAtSeaCount' constructorParams='this' styleClass="int6"/> </cell> </row> <row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss index 6b793b6..b27a1d3 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss @@ -70,11 +70,8 @@ BeanComboBox { #daysAtSeaCount { bean:{bean}; property:{FloatingObjectDto.PROPERTY_DAYS_AT_SEA_COUNT}; - model:{bean.getDaysAtSeaCount()}; - autoPopup:{config.isAutoPopupNumberEditor()}; - showPopupButton:{config.isShowNumberEditorButton()}; + numberValue:{bean.getDaysAtSeaCount()}; showReset:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; } #comment { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java index 4f31315..1f6de5a 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java @@ -149,7 +149,7 @@ public class FloatingObjectUIHandler extends ContentUIHandler<FloatingObjectDto, getTypeI18nKey(FloatingObjectDto.class), t("observe.content.floatingObject.message.updating")); } - super.startEditUI(FloatingObjectUI.BINDING_DAYS_AT_SEA_COUNT_MODEL, + super.startEditUI(FloatingObjectUI.BINDING_DAYS_AT_SEA_COUNT_NUMBER_VALUE, FloatingObjectUI.BINDING_OBJECT_TYPE_SELECTED_ITEM, FloatingObjectUI.BINDING_OBJECT_FATE_SELECTED_ITEM, FloatingObjectUI.BINDING_COMMENT_MODEL); diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jaxx index 557fe39..6a2c5ce 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jaxx @@ -38,8 +38,8 @@ fr.ird.observe.application.swing.ui.util.BooleanEditor fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.datetime.DateTimeEditor @@ -143,7 +143,7 @@ <JLabel id='schoolThicknessLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='schoolThickness' constructorParams='this'/> + <NumberEditor id='schoolThickness' constructorParams='this' styleClass="int6"/> </cell> </row> <row> @@ -151,7 +151,7 @@ <JLabel id='schoolMeanDepthLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='schoolMeanDepth' constructorParams='this'/> + <NumberEditor id='schoolMeanDepth' constructorParams='this' styleClass="int6"/> </cell> </row> <row> @@ -159,7 +159,7 @@ <JLabel id='schoolTopDepthLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='schoolTopDepth' constructorParams='this'/> + <NumberEditor id='schoolTopDepth' constructorParams='this' styleClass="int6"/> </cell> </row> </Table> @@ -174,7 +174,7 @@ <JLabel id='currentSpeedLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='currentSpeed' constructorParams='this'/> + <NumberEditor id='currentSpeed' constructorParams='this' styleClass="float1"/> </cell> </row> <row> @@ -182,7 +182,7 @@ <JLabel id='currentDirectionLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='currentDirection' constructorParams='this'/> + <NumberEditor id='currentDirection' constructorParams='this' styleClass="float3"/> </cell> </row> <row> @@ -190,7 +190,7 @@ <JLabel id='currentMeasureDepthLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='currentMeasureDepth' constructorParams='this'/> + <NumberEditor id='currentMeasureDepth' constructorParams='this' styleClass="int6"/> </cell> </row> <row> @@ -198,7 +198,7 @@ <JLabel id='maxGearDepthLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='maxGearDepth' constructorParams='this'/> + <NumberEditor id='maxGearDepth' constructorParams='this' styleClass="int6"/> </cell> </row> </Table> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jcss index 4d47341..8e83cfc 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUI.jcss @@ -136,8 +136,7 @@ #schoolThickness { property:{SetSeineDto.PROPERTY_SCHOOL_THICKNESS}; - model:{bean.getSchoolThickness()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getSchoolThickness()}; _validatorLabel:{t("observe.content.setSeine.schoolThickness")}; } @@ -148,8 +147,7 @@ #schoolMeanDepth { property:{SetSeineDto.PROPERTY_SCHOOL_MEAN_DEPTH}; - model:{bean.getSchoolMeanDepth()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getSchoolMeanDepth()}; _validatorLabel:{t("observe.content.setSeine.schoolMeanDepth")}; } @@ -160,8 +158,7 @@ #schoolTopDepth { property:{SetSeineDto.PROPERTY_SCHOOL_TOP_DEPTH}; - model:{bean.getSchoolTopDepth()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getSchoolTopDepth()}; _validatorLabel:{t("observe.content.setSeine.schoolTopDepth")}; } @@ -172,8 +169,7 @@ #currentMeasureDepth { property:{SetSeineDto.PROPERTY_CURRENT_MEASURE_DEPTH}; - model:{bean.getCurrentMeasureDepth()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getCurrentMeasureDepth()}; _validatorLabel:{t("observe.content.setSeine.currentMeasureDepth")}; } @@ -184,9 +180,7 @@ #currentSpeed { property:{SetSeineDto.PROPERTY_CURRENT_SPEED}; - model:{bean.getCurrentSpeed()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL1_PATTERN}; + numberValue:{bean.getCurrentSpeed()}; _validatorLabel:{t("observe.content.setSeine.currentSpeed")}; } @@ -197,8 +191,7 @@ #currentDirection { property:{SetSeineDto.PROPERTY_CURRENT_DIRECTION}; - model:{bean.getCurrentDirection()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_3_DIGITS_PATTERN}; + numberValue:{bean.getCurrentDirection()}; _validatorLabel:{t("observe.content.setSeine.currentDirection")}; } @@ -209,8 +202,7 @@ #maxGearDepth { property:{SetSeineDto.PROPERTY_MAX_GEAR_DEPTH}; - model:{bean.getMaxGearDepth()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{bean.getMaxGearDepth()}; _validatorLabel:{t("observe.content.setSeine.maxGearDepth")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java index ee0b707..ae81301 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/SetSeineUIHandler.java @@ -42,7 +42,7 @@ import fr.ird.observe.services.dto.seine.SetSeineHelper; import fr.ird.observe.services.service.data.seine.RouteService; import fr.ird.observe.services.service.data.seine.SetSeineService; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.HidorButton; +import org.nuiton.jaxx.widgets.hidor.HidorButton; import org.nuiton.jaxx.validator.swing.SwingValidatorMessage; import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel; import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; @@ -217,17 +217,17 @@ public class SetSeineUIHandler extends ContentUIHandler<SetSeineDto, SetSeineUI> SetSeineUI.BINDING_END_SET_TIME_STAMP_DATE, SetSeineUI.BINDING_END_SET_TIME_STAMP_DATE, SetSeineUI.BINDING_END_PURSING_TIME_STAMP_DATE, - SetSeineUI.BINDING_CURRENT_SPEED_MODEL, - SetSeineUI.BINDING_CURRENT_DIRECTION_MODEL, + SetSeineUI.BINDING_CURRENT_SPEED_NUMBER_VALUE, + SetSeineUI.BINDING_CURRENT_DIRECTION_NUMBER_VALUE, SetSeineUI.BINDING_REASON_FOR_NULL_SET_SELECTED_ITEM, - SetSeineUI.BINDING_CURRENT_SPEED_MODEL, + SetSeineUI.BINDING_CURRENT_SPEED_NUMBER_VALUE, SetSeineUI.BINDING_NON_TARGET_DISCARDED_BOOLEAN_VALUE, SetSeineUI.BINDING_TARGET_DISCARDED_BOOLEAN_VALUE, - SetSeineUI.BINDING_SCHOOL_THICKNESS_MODEL, + SetSeineUI.BINDING_SCHOOL_THICKNESS_NUMBER_VALUE, SetSeineUI.BINDING_SCHOOL_TYPE_TEXT, - SetSeineUI.BINDING_MAX_GEAR_DEPTH_MODEL, - SetSeineUI.BINDING_SCHOOL_MEAN_DEPTH_MODEL, - SetSeineUI.BINDING_SCHOOL_TOP_DEPTH_MODEL); + SetSeineUI.BINDING_MAX_GEAR_DEPTH_NUMBER_VALUE, + SetSeineUI.BINDING_SCHOOL_MEAN_DEPTH_NUMBER_VALUE, + SetSeineUI.BINDING_SCHOOL_TOP_DEPTH_NUMBER_VALUE); model.setModified(create); } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUI.jaxx index 105fd52..4e25e75 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUI.jaxx @@ -31,7 +31,7 @@ fr.ird.observe.services.dto.IdDto fr.ird.observe.services.dto.reference.DataReference - org.nuiton.jaxx.runtime.swing.editor.bean.BeanListHeader + org.nuiton.jaxx.widgets.select.BeanListHeader java.awt.Dimension diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java index a968d50..8feb026 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java @@ -31,7 +31,7 @@ import fr.ird.observe.services.dto.DataDto; import fr.ird.observe.services.dto.IdDto; import fr.ird.observe.services.dto.reference.AbstractReference; import fr.ird.observe.services.dto.reference.DataReference; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanListHeader; +import org.nuiton.jaxx.widgets.select.BeanListHeader; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jaxx index 3b096f8..f3edb5a 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jaxx @@ -36,8 +36,8 @@ fr.ird.observe.application.swing.ui.actions.content.DeleteDataUIAction fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.datetime.DateTimeEditor org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor @@ -109,7 +109,7 @@ <JLabel id='seaSurfaceTemperatureLabel'/> </cell> <cell anchor='east' fill="both"> - <NumberEditor id='seaSurfaceTemperature' constructorParams='this'/> + <NumberEditor id='seaSurfaceTemperature' constructorParams='this' styleClass="float2"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jcss index 84127bb..5759b12 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUI.jcss @@ -76,9 +76,7 @@ #seaSurfaceTemperature { property:{ActivityLonglineDto.PROPERTY_SEA_SURFACE_TEMPERATURE}; - model:{bean.getSeaSurfaceTemperature()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; + numberValue:{bean.getSeaSurfaceTemperature()}; } #reopen { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUIHandler.java index 91995af..6533f3d 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/ActivityLonglineUIHandler.java @@ -220,7 +220,7 @@ class ActivityLonglineUIHandler extends ContentOpenableUIHandler<ActivityLonglin super.startEditUI( ActivityLonglineUI.BINDING_TIME_STAMP_DATE, - ActivityLonglineUI.BINDING_SEA_SURFACE_TEMPERATURE_MODEL, + ActivityLonglineUI.BINDING_SEA_SURFACE_TEMPERATURE_NUMBER_VALUE, ActivityLonglineUI.BINDING_COMMENT_MODEL, ActivityLonglineUI.BINDING_VESSEL_ACTIVITY_LONGLINE_SELECTED_ITEM, ActivityLonglineUI.BINDING_FPA_ZONE_SELECTED_ITEM, diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jaxx index 5003143..6a041a4 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jaxx @@ -40,8 +40,8 @@ org.jdesktop.swingx.JXDatePicker - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -186,7 +186,7 @@ protected boolean canEditOcean(java.util.LinkedHashSet<TripLonglineActivityDto> <JLabel id='totalFishingOperationsNumberLabel'/> </cell> <cell anchor='west' weightx="0.5"> - <NumberEditor id='totalFishingOperationsNumber' constructorParams='this'/> + <NumberEditor id='totalFishingOperationsNumber' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jcss index c44461a..9ec1526 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUI.jcss @@ -20,12 +20,6 @@ * #L% */ -NumberEditor { - bean:{bean}; - useFloat:false; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; -} - #generalTab { title: {t("observe.content.tripLongline.tab.general")}; } @@ -127,9 +121,9 @@ NumberEditor { } #totalFishingOperationsNumber { + bean:{bean}; property:{TripLonglineDto.PROPERTY_TOTAL_FISHING_OPERATIONS_NUMBER}; - model:{bean.getTotalFishingOperationsNumber()}; - useFloat:false; + numberValue:{bean.getTotalFishingOperationsNumber()}; } #homeIdLabel { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUIHandler.java index 45a6e83..d9834a2 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/longline/TripLonglineUIHandler.java @@ -214,7 +214,7 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr TripLonglineUI.BINDING_CAPTAIN_SELECTED_ITEM, TripLonglineUI.BINDING_TRIP_TYPE_SELECTED_ITEM, TripLonglineUI.BINDING_DATA_ENTRY_OPERATOR_SELECTED_ITEM, - TripLonglineUI.BINDING_TOTAL_FISHING_OPERATIONS_NUMBER_MODEL, + TripLonglineUI.BINDING_TOTAL_FISHING_OPERATIONS_NUMBER_NUMBER_VALUE, TripLonglineUI.BINDING_OCEAN_SELECTED_ITEM, TripLonglineUI.BINDING_START_DATE_DATE, TripLonglineUI.BINDING_END_DATE_DATE, diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jaxx index 97c8658..291eade 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jaxx @@ -43,8 +43,8 @@ fr.ird.observe.application.swing.ui.actions.content.AddActivitySeineFloatingObjectUIAction fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.datetime.TimeEditor org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor @@ -187,7 +187,7 @@ <JLabel id='vesselSpeedLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='vesselSpeed' constructorParams='this'/> + <NumberEditor id='vesselSpeed' constructorParams='this' styleClass="float2"/> </cell> </row> @@ -197,7 +197,7 @@ <JLabel id='seaSurfaceTemperatureLabel'/> </cell> <cell anchor='east' fill="both"> - <NumberEditor id='seaSurfaceTemperature' constructorParams='this'/> + <NumberEditor id='seaSurfaceTemperature' constructorParams='this' styleClass="float2"/> </cell> </row> @@ -259,7 +259,7 @@ <JLabel id='observedSystemDistanceLabel'/> </cell> <cell weightx="1" fill="both"> - <NumberEditor id='observedSystemDistance' constructorParams='this'/> + <NumberEditor id='observedSystemDistance' constructorParams='this' styleClass="float2"/> </cell> </row> </Table> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jcss index bacad88..725710f 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUI.jcss @@ -129,9 +129,7 @@ #vesselSpeed { property:{ActivitySeineDto.PROPERTY_VESSEL_SPEED}; - model:{bean.getVesselSpeed()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; + numberValue:{bean.getVesselSpeed()}; } #ersIdLabel{ @@ -156,9 +154,7 @@ #seaSurfaceTemperature { property:{ActivitySeineDto.PROPERTY_SEA_SURFACE_TEMPERATURE}; - model:{bean.getSeaSurfaceTemperature()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; + numberValue:{bean.getSeaSurfaceTemperature()}; } #windLabel { @@ -219,9 +215,7 @@ #observedSystemDistance { bean:{bean}; property: {ActivitySeineDto.PROPERTY_OBSERVED_SYSTEM_DISTANCE}; - model:{bean.getObservedSystemDistance()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; + numberValue:{bean.getObservedSystemDistance()}; } #reopen { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIHandler.java index 3eb3bad..50387b7 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIHandler.java @@ -263,8 +263,8 @@ class ActivitySeineUIHandler extends ContentOpenableUIHandler<ActivitySeineDto, } super.startEditUI(ActivitySeineUI.BINDING_TIME_TIME, - ActivitySeineUI.BINDING_VESSEL_SPEED_MODEL, - ActivitySeineUI.BINDING_SEA_SURFACE_TEMPERATURE_MODEL, + ActivitySeineUI.BINDING_VESSEL_SPEED_NUMBER_VALUE, + ActivitySeineUI.BINDING_SEA_SURFACE_TEMPERATURE_NUMBER_VALUE, ActivitySeineUI.BINDING_COMMENT_MODEL, ActivitySeineUI.BINDING_VESSEL_ACTIVITY_SEINE_SELECTED_ITEM, ActivitySeineUI.BINDING_PREVIOUS_FPA_ZONE_SELECTED_ITEM, diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jaxx index ca96029..d3a99e3 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jaxx @@ -32,7 +32,7 @@ org.jdesktop.swingx.JXDatePicker - org.nuiton.jaxx.runtime.swing.editor.NumberEditor + org.nuiton.jaxx.widgets.number.NumberEditor java.awt.Dimension @@ -68,7 +68,7 @@ <JLabel id='startLogValueLabel'/> </cell> <cell anchor='east' weightx="1"> - <NumberEditor id='startLogValue' constructorParams='this'/> + <NumberEditor id='startLogValue' constructorParams='this' styleClass="float2"/> </cell> </row> <row> @@ -76,7 +76,7 @@ <JLabel id='endLogValueLabel'/> </cell> <cell anchor='east' weightx="1"> - <NumberEditor id='endLogValue' constructorParams='this'/> + <NumberEditor id='endLogValue' constructorParams='this' styleClass="float2"/> </cell> </row> <row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jcss index a3813df..159e0ca 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUI.jcss @@ -22,8 +22,6 @@ NumberEditor { bean:{bean}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; } #model { @@ -49,7 +47,7 @@ NumberEditor { #startLogValue { property:{RouteDto.PROPERTY_START_LOG_VALUE}; - model:{bean.getStartLogValue()}; + numberValue:{bean.getStartLogValue()}; } #endLogValueLabel { @@ -59,7 +57,7 @@ NumberEditor { #endLogValue { property:{RouteDto.PROPERTY_END_LOG_VALUE}; - model:{bean.getEndLogValue()}; + numberValue:{bean.getEndLogValue()}; enabled:{!model.isCreatingMode()}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUIHandler.java index f33a350..e7aed7b 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/RouteUIHandler.java @@ -174,7 +174,7 @@ class RouteUIHandler extends ContentOpenableUIHandler<RouteDto, RouteUI> impleme } super.startEditUI(RouteUI.BINDING_DATE_DATE, - RouteUI.BINDING_START_LOG_VALUE_MODEL, + RouteUI.BINDING_START_LOG_VALUE_NUMBER_VALUE, RouteUI.BINDING_END_LOG_VALUE_ENABLED, RouteUI.BINDING_COMMENT_MODEL, RouteUI.BINDING_CLOSE_ENABLED, diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/TripSeineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/TripSeineUI.jaxx index 867a3c2..93154dc 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/TripSeineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/TripSeineUI.jaxx @@ -43,8 +43,8 @@ org.jdesktop.swingx.JXDatePicker - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension java.beans.PropertyChangeEvent diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUI.jaxx index 77e406e..965875e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUI.jaxx @@ -42,7 +42,7 @@ fr.ird.observe.application.swing.ui.actions.global.ResetDataGlobalUIAction fr.ird.observe.application.swing.ui.actions.global.SaveDataGlobalUIAction - org.nuiton.jaxx.runtime.swing.editor.bean.BeanListHeader + org.nuiton.jaxx.widgets.select.BeanListHeader org.nuiton.jaxx.validator.swing.SwingValidator javax.swing.DefaultListModel diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUIHandler.java index 5c09b13..8aab6f8 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/ContentReferenceUIHandler.java @@ -48,7 +48,7 @@ import fr.ird.observe.services.dto.result.SaveResultDto; import fr.ird.observe.services.service.DataNotFoundException; import fr.ird.observe.services.service.referential.ReferentialService; import org.nuiton.jaxx.runtime.swing.CardLayout2Ext; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanListHeader; +import org.nuiton.jaxx.widgets.select.BeanListHeader; import org.nuiton.jaxx.validator.swing.SwingValidatorUtil; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/GearCaracteristicUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/GearCaracteristicUI.jaxx index 69cc6f7..0c9b636 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/GearCaracteristicUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/GearCaracteristicUI.jaxx @@ -30,7 +30,7 @@ fr.ird.observe.services.dto.referential.GearCaracteristicDto fr.ird.observe.services.dto.referential.GearCaracteristicTypeDto - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue fr.ird.observe.common.constants.ReferenceStatus diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/HarbourUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/HarbourUI.jaxx index 9a477dd..42eaf7e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/HarbourUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/HarbourUI.jaxx @@ -29,7 +29,7 @@ fr.ird.observe.services.dto.referential.HarbourDto fr.ird.observe.services.dto.referential.CountryDto - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthLengthParameterUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthLengthParameterUI.jaxx index 9668743..001bbcd 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthLengthParameterUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthLengthParameterUI.jaxx @@ -32,8 +32,8 @@ fr.ird.observe.application.swing.ui.UIHelper fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox javax.swing.JScrollPane javax.swing.JTable diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jaxx index 6235266..bedb11c 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jaxx @@ -35,8 +35,8 @@ fr.ird.observe.application.swing.ui.UIHelper fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.jdesktop.swingx.JXDatePicker diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jcss index f1a6412..87a9aa8 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/LengthWeightParameterUI.jcss @@ -159,7 +159,7 @@ #meanLength { property:{LengthWeightParameterDto.PROPERTY_MEAN_LENGTH}; - model:{bean.getMeanLength()}; + numberValue:{bean.getMeanLength()}; } #meanWeightLabel { @@ -169,7 +169,7 @@ #meanWeight { property:{LengthWeightParameterDto.PROPERTY_MEAN_WEIGHT}; - model:{bean.getMeanWeight()}; + numberValue:{bean.getMeanWeight()}; } #sourceField { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/OrganismUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/OrganismUI.jaxx index af13628..9e06b66 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/OrganismUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/OrganismUI.jaxx @@ -30,7 +30,7 @@ fr.ird.observe.services.dto.referential.OrganismDto fr.ird.observe.services.dto.referential.CountryDto - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue fr.ird.observe.common.constants.ReferenceStatus diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/PersonUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/PersonUI.jaxx index 9f4f9fd..7b7be42 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/PersonUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/PersonUI.jaxx @@ -35,7 +35,7 @@ javax.swing.JScrollPane javax.swing.table.TableCellRenderer - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue fr.ird.observe.common.constants.ReferenceStatus diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ProgramUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ProgramUI.jaxx index 1921ffa..e29e037 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ProgramUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ProgramUI.jaxx @@ -36,7 +36,7 @@ fr.ird.observe.application.swing.ui.content.ref.impl.ProgramObservationEnum fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox org.jdesktop.swingx.JXDatePicker diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jaxx index 2ca3ce4..a187502 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jaxx @@ -27,7 +27,7 @@ fr.ird.observe.services.dto.referential.ShipOwnerDto fr.ird.observe.services.dto.referential.CountryDto - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue fr.ird.observe.common.constants.ReferenceStatus diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesGroupUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesGroupUI.jaxx index d5763f7..cc91e22 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesGroupUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesGroupUI.jaxx @@ -28,7 +28,7 @@ <import> fr.ird.observe.services.dto.referential.SpeciesGroupDto - org.nuiton.jaxx.runtime.swing.editor.NumberEditor + org.nuiton.jaxx.widgets.number.NumberEditor static fr.ird.observe.application.swing.ui.UIHelper.getStringValue fr.ird.observe.common.constants.ReferenceStatus diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jaxx index b0f2b2a..466f7cd 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jaxx @@ -33,8 +33,8 @@ fr.ird.observe.services.dto.referential.OceanDto fr.ird.observe.services.dto.referential.SizeMeasureTypeDto - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.select.FilterableDoubleList java.util.Collection diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jcss index 026061c..8f9544b 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/SpeciesUI.jcss @@ -119,24 +119,24 @@ #minLength { property: {SpeciesDto.PROPERTY_MIN_LENGTH}; - model:{bean.getMinLength()}; + numberValue:{bean.getMinLength()}; _validatorLabel: {t("observe.common.minLength")}; } #maxLength { property:{SpeciesDto.PROPERTY_MAX_LENGTH}; - model:{bean.getMaxLength()}; + numberValue:{bean.getMaxLength()}; _validatorLabel: {t("observe.common.maxLength")}; } #minWeight { property:{SpeciesDto.PROPERTY_MIN_WEIGHT}; - model:{bean.getMinWeight()}; + numberValue:{bean.getMinWeight()}; _validatorLabel: {t("observe.common.minWeight")}; } #maxWeight { property:{SpeciesDto.PROPERTY_MAX_WEIGHT}; - model:{bean.getMaxWeight()}; + numberValue:{bean.getMaxWeight()}; _validatorLabel: {t("observe.common.maxWeight")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx index 2155852..0cfb5aa 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx @@ -34,8 +34,8 @@ fr.ird.observe.services.dto.referential.VesselTypeDto fr.ird.observe.services.dto.referential.ShipOwnerDto - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.jdesktop.swingx.JXDatePicker @@ -67,8 +67,8 @@ </cell> <cell anchor='east' weightx="1" fill="both"> <JPanel layout='{new GridLayout()}'> - <NumberEditor id='keelCode' constructorParams='this' styleClass="integer"/> - <NumberEditor id='fleetCountry' constructorParams='this' styleClass="integer"/> + <NumberEditor id='keelCode' constructorParams='this' styleClass="int6"/> + <NumberEditor id='fleetCountry' constructorParams='this' styleClass="int6"/> </JPanel> </cell> </row> @@ -237,7 +237,7 @@ <JLabel id='powerLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='power' constructorParams='this' styleClass="integer"/> + <NumberEditor id='power' constructorParams='this' styleClass="int6"/> </cell> </row> @@ -257,7 +257,7 @@ <JLabel id='yearServiceLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NumberEditor id='yearService' constructorParams='this' styleClass="integer"/> + <NumberEditor id='yearService' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss index 6a91ab7..ec0afb3 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss @@ -41,12 +41,12 @@ #keelCode { property:{VesselDto.PROPERTY_KEEL_CODE}; - model:{bean.getKeelCode()}; + numberValue:{bean.getKeelCode()}; } #fleetCountry { property:{VesselDto.PROPERTY_FLEET_COUNTRY}; - model:{bean.getFleetCountry()}; + numberValue:{bean.getFleetCountry()}; } #vesselTypeLabel { @@ -97,7 +97,7 @@ #length { property:{VesselDto.PROPERTY_LENGTH}; - model:{bean.getLength()}; + numberValue:{bean.getLength()}; } #capacityLabel { @@ -107,7 +107,7 @@ #capacity { property:{VesselDto.PROPERTY_CAPACITY}; - model:{bean.getCapacity()}; + numberValue:{bean.getCapacity()}; } #powerLabel { @@ -117,7 +117,7 @@ #power { property:{VesselDto.PROPERTY_POWER}; - model:{bean.getPower()}; + numberValue:{bean.getPower()}; } #searchMaximumLabel { @@ -127,7 +127,7 @@ #searchMaximum { property:{VesselDto.PROPERTY_SEARCH_MAXIMUM}; - model:{bean.getSearchMaximum()}; + numberValue:{bean.getSearchMaximum()}; } #yearServiceLabel { @@ -137,7 +137,7 @@ #yearService { property:{VesselDto.PROPERTY_YEAR_SERVICE}; - model:{bean.getYearService()}; + numberValue:{bean.getYearService()}; } #changeDateLabel { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java index 55e5553..b8d2c81 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java @@ -108,13 +108,13 @@ public class VesselUIModel extends ContentReferenceUIModel<VesselDto> { new String[]{VesselUI.BINDING_VESSEL_TYPE_SELECTED_ITEM, VesselUI.BINDING_VESSEL_SIZE_CATEGORY_SELECTED_ITEM, VesselUI.BINDING_FLAG_COUNTRY_SELECTED_ITEM, - VesselUI.BINDING_KEEL_CODE_MODEL, - VesselUI.BINDING_FLEET_COUNTRY_MODEL, - VesselUI.BINDING_YEAR_SERVICE_MODEL, - VesselUI.BINDING_LENGTH_MODEL, - VesselUI.BINDING_CAPACITY_MODEL, - VesselUI.BINDING_POWER_MODEL, - VesselUI.BINDING_SEARCH_MAXIMUM_MODEL, + VesselUI.BINDING_KEEL_CODE_NUMBER_VALUE, + VesselUI.BINDING_FLEET_COUNTRY_NUMBER_VALUE, + VesselUI.BINDING_YEAR_SERVICE_NUMBER_VALUE, + VesselUI.BINDING_LENGTH_NUMBER_VALUE, + VesselUI.BINDING_CAPACITY_NUMBER_VALUE, + VesselUI.BINDING_POWER_NUMBER_VALUE, + VesselUI.BINDING_SEARCH_MAXIMUM_NUMBER_VALUE, VesselUI.BINDING_CHANGE_DATE_DATE} ); } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/seine/WeightCategoryUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/seine/WeightCategoryUI.jaxx index 9118463..1e361f6 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/seine/WeightCategoryUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/seine/WeightCategoryUI.jaxx @@ -31,7 +31,7 @@ fr.ird.observe.services.dto.referential.SpeciesDto fr.ird.observe.application.swing.ui.UIHelper - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox javax.swing.JScrollPane javax.swing.JTable diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUI.jaxx index 07b9210..1bb10ef 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUI.jaxx @@ -28,7 +28,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. fr.ird.observe.services.dto.reference.AbstractReference fr.ird.observe.services.dto.reference.ReferenceMap org.nuiton.jaxx.runtime.context.JAXXInitialContext - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox java.util.List static org.nuiton.i18n.I18n.t diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUIHandler.java index bf00a54..c9428b8 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDeleteUIHandler.java @@ -22,7 +22,7 @@ package fr.ird.observe.application.swing.ui.content.ref.usage; * #L% */ -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import javax.swing.JLabel; import javax.swing.JOptionPane; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUI.jaxx index 50deb65..45d6dfa 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUI.jaxx @@ -28,7 +28,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee. fr.ird.observe.services.dto.reference.AbstractReference fr.ird.observe.services.dto.reference.ReferenceMap org.nuiton.jaxx.runtime.context.JAXXInitialContext - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox java.util.List static org.nuiton.i18n.I18n.t diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUIHandler.java index 2559207..4606ade 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDesactivateUIHandler.java @@ -22,7 +22,7 @@ package fr.ird.observe.application.swing.ui.content.ref.usage; * #L% */ -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import javax.swing.JLabel; import javax.swing.JOptionPane; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDisplayUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDisplayUIHandler.java index 2cb7492..73e5a7e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDisplayUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageForDisplayUIHandler.java @@ -22,7 +22,7 @@ package fr.ird.observe.application.swing.ui.content.ref.usage; * #L% */ -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import javax.swing.JLabel; import javax.swing.JPanel; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageUIHandlerSupport.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageUIHandlerSupport.java index c872ae9..8716c0f 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageUIHandlerSupport.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/usage/UsageUIHandlerSupport.java @@ -34,7 +34,7 @@ import fr.ird.observe.services.dto.reference.ReferentialReference; import fr.ird.observe.services.dto.referential.ReferentialDto; import org.nuiton.jaxx.runtime.JAXXObject; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import org.apache.commons.lang3.BooleanUtils; import org.nuiton.decorator.Decorator; import org.nuiton.decorator.JXPathDecorator; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIInitializer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIInitializer.java index 9beb0bf..b491f9d 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIInitializer.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIInitializer.java @@ -24,14 +24,14 @@ package fr.ird.observe.application.swing.ui.content.table; import fr.ird.observe.application.swing.ObserveSwingApplicationContext; import fr.ird.observe.application.swing.ui.ObserveKeyStrokes; +import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.content.ContentUIInitializer; import fr.ird.observe.application.swing.ui.content.ObserveActionMap; import fr.ird.observe.application.swing.ui.util.BooleanEditor; import fr.ird.observe.services.dto.IdDto; -import org.nuiton.jaxx.runtime.SwingUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.jaxx.application.bean.JavaBeanObjectUtil; +import org.nuiton.jaxx.runtime.SwingUtil; import javax.swing.AbstractAction; import javax.swing.AbstractButton; @@ -219,7 +219,7 @@ public class ContentTableUIInitializer<E extends IdDto, D extends IdDto, UI exte final String propertyName = (String) editor.getClientProperty(CLIENT_PROPERTY_RESET_TABLE_PROPERTY_NAME); if (propertyName != null) { - editor.addActionListener(e -> JavaBeanObjectUtil.setProperty(getTableEditBean(), propertyName, null)); + editor.addActionListener(e -> UIHelper.setProperty(getTableEditBean(), propertyName, null)); } } @@ -238,7 +238,7 @@ public class ContentTableUIInitializer<E extends IdDto, D extends IdDto, UI exte public void keyReleased(KeyEvent e) { JTextField source = (JTextField) e.getSource(); String text = source.getText(); - JavaBeanObjectUtil.setProperty(getTableEditBean(), propertyName, text); + UIHelper.setProperty(getTableEditBean(), propertyName, text); } }); } @@ -255,7 +255,7 @@ public class ContentTableUIInitializer<E extends IdDto, D extends IdDto, UI exte public void keyReleased(KeyEvent e) { JTextArea source = (JTextArea) e.getSource(); String text = source.getText(); - JavaBeanObjectUtil.setProperty(getTableEditBean(), propertyName, text); + UIHelper.setProperty(getTableEditBean(), propertyName, text); } }); } @@ -271,7 +271,7 @@ public class ContentTableUIInitializer<E extends IdDto, D extends IdDto, UI exte if (propertyName != null) { editor.addItemListener(event -> { Boolean newValue = ((JCheckBox) event.getSource()).isSelected(); - JavaBeanObjectUtil.setProperty(getTableEditBean(), propertyName, newValue); + UIHelper.setProperty(getTableEditBean(), propertyName, newValue); }); } @@ -288,7 +288,7 @@ public class ContentTableUIInitializer<E extends IdDto, D extends IdDto, UI exte if (event.getStateChange() == ItemEvent.SELECTED) { Boolean newValue = ((BooleanEditor) event.getSource()).getBooleanValue(); - JavaBeanObjectUtil.setProperty(getTableEditBean(), propertyName, newValue); + UIHelper.setProperty(getTableEditBean(), propertyName, newValue); } }); } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jaxx index ea4b817..a2048d4 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jaxx @@ -34,8 +34,8 @@ fr.ird.observe.services.dto.referential.longline.BaitSettingStatusDto fr.ird.observe.application.swing.ui.content.table.* - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue static org.nuiton.i18n.I18n.n @@ -94,7 +94,7 @@ <JLabel id='individualSizeLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='individualSize' constructorParams='this'/> + <NumberEditor id='individualSize' constructorParams='this' styleClass="int6"/> </cell> </row> @@ -104,7 +104,7 @@ <JLabel id='individualWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='individualWeight' constructorParams='this'/> + <NumberEditor id='individualWeight' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -114,7 +114,7 @@ <JLabel id='proportionLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='proportion' constructorParams='this'/> + <NumberEditor id='proportion' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jcss index 4cb6e80..dd8f346 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BaitsCompositionUI.jcss @@ -49,8 +49,7 @@ #individualSize { property:{BaitsCompositionDto.PROPERTY_INDIVIDUAL_SIZE}; - model:{tableEditBean.getIndividualSize()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getIndividualSize()}; _validatorLabel:{t("observe.content.baitsComposition.individualSize")}; } @@ -61,8 +60,7 @@ #individualWeight { property:{BaitsCompositionDto.PROPERTY_INDIVIDUAL_WEIGHT}; - model:{tableEditBean.getIndividualWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getIndividualWeight()}; _validatorLabel:{t("observe.content.baitsComposition.individualWeight")}; } @@ -73,8 +71,7 @@ #proportion { property:{BaitsCompositionDto.PROPERTY_PROPORTION}; - model:{tableEditBean.getProportion()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getProportion()}; _validatorLabel:{t("observe.content.baitsComposition.proportion")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jaxx index 27dc876..570c1f8 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jaxx @@ -33,8 +33,8 @@ fr.ird.observe.services.dto.referential.longline.LineTypeDto fr.ird.observe.application.swing.ui.content.table.* - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue static org.nuiton.i18n.I18n.n @@ -93,7 +93,7 @@ <JLabel id='lengthLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='length' constructorParams='this'/> + <NumberEditor id='length' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -103,7 +103,7 @@ <JLabel id='tracelineLengthLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='tracelineLength' constructorParams='this'/> + <NumberEditor id='tracelineLength' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -113,7 +113,7 @@ <JLabel id='proportionLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='proportion' constructorParams='this'/> + <NumberEditor id='proportion' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jcss index 0d44414..5bd4c76 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/BranchlinesCompositionUI.jcss @@ -49,8 +49,7 @@ #length { property:{BranchlinesCompositionDto.PROPERTY_LENGTH}; - model:{tableEditBean.getLength()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getLength()}; _validatorLabel:{t("observe.content.branchlinesComposition.length")}; } @@ -61,8 +60,7 @@ #tracelineLength { property:{BranchlinesCompositionDto.PROPERTY_TRACELINE_LENGTH}; - model:{tableEditBean.getTracelineLength()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getTracelineLength()}; } #proportionLabel { @@ -72,8 +70,7 @@ #proportion { property:{BranchlinesCompositionDto.PROPERTY_PROPORTION}; - model:{tableEditBean.getProportion()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getProportion()}; _validatorLabel:{t("observe.content.branchlinesComposition.proportion")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineContentTableUIInitializer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineContentTableUIInitializer.java index 5f2e997..abc2d22 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineContentTableUIInitializer.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineContentTableUIInitializer.java @@ -23,12 +23,12 @@ package fr.ird.observe.application.swing.ui.content.table.impl.longline; */ +import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.content.table.ContentTableUIInitializer; import fr.ird.observe.services.dto.longline.CatchLonglineDto; import fr.ird.observe.services.dto.longline.SetLonglineCatchDto; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.jaxx.application.bean.JavaBeanObjectUtil; import javax.swing.JCheckBox; @@ -57,7 +57,7 @@ public class CatchLonglineContentTableUIInitializer extends ContentTableUIInitia if (propertyName != null) { editor.addItemListener(event -> { Boolean newValue = ((JCheckBox) event.getSource()).isSelected(); - JavaBeanObjectUtil.setProperty(ui.getBranchlineBean(), propertyName, newValue); + UIHelper.setProperty(ui.getBranchlineBean(), propertyName, newValue); }); } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jaxx index bd571bc..39f08b0 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jaxx @@ -50,8 +50,8 @@ fr.ird.observe.application.swing.ui.util.BooleanEditor fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.select.FilterableDoubleList org.nuiton.jaxx.widgets.datetime.DateTimeEditor org.nuiton.jaxx.widgets.datetime.TimeEditor @@ -211,13 +211,13 @@ <JLabel id='countLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='count' constructorParams='this'/> + <NumberEditor id='count' constructorParams='this' styleClass="int6"/> </cell> <cell> <JLabel id='totalWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='totalWeight' constructorParams='this'/> + <NumberEditor id='totalWeight' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -305,7 +305,7 @@ <JLabel id='beatDiameterLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='beatDiameter' constructorParams='this'/> + <NumberEditor id='beatDiameter' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -368,7 +368,7 @@ <JLabel id='gonadeWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='gonadeWeight' constructorParams='this'/> + <NumberEditor id='gonadeWeight' constructorParams='this' styleClass="float3"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jcss index 38ae930..f41e4bb 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/CatchLonglineUI.jcss @@ -161,8 +161,7 @@ #count { property:{CatchLonglineDto.PROPERTY_COUNT}; - model:{tableEditBean.getCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getCount()}; _validatorLabel: {t("observe.content.catchLongline.count")}; } @@ -173,8 +172,7 @@ #totalWeight { property:{CatchLonglineDto.PROPERTY_TOTAL_WEIGHT}; - model:{tableEditBean.getTotalWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getTotalWeight()}; _validatorLabel: {t("observe.content.catchLongline.totalWeight")}; } @@ -263,8 +261,7 @@ #beatDiameter { property:{CatchLonglineDto.PROPERTY_BEAT_DIAMETER}; - model:{tableEditBean.getBeatDiameter()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getBeatDiameter()}; _validatorLabel: {t("observe.content.catchLongline.beatDiameter")}; } @@ -341,8 +338,7 @@ #gonadeWeight { property:{CatchLonglineDto.PROPERTY_GONADE_WEIGHT}; - model:{tableEditBean.getGonadeWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getGonadeWeight()}; _validatorLabel:{t("observe.content.catchLongline.gonadeWeight")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jaxx index dce6d0d..9195332 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jaxx @@ -35,8 +35,8 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -96,7 +96,7 @@ <JLabel id='distanceLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='distance' constructorParams='this'/> + <NumberEditor id='distance' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -106,7 +106,7 @@ <JLabel id='countLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='count' constructorParams='this'/> + <NumberEditor id='count' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jcss index 06b7bbd..2cc68cb 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/EncounterUI.jcss @@ -47,8 +47,7 @@ #count { property:{EncounterDto.PROPERTY_COUNT}; - model:{tableEditBean.getCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getCount()}; } #distanceLabel { @@ -58,8 +57,7 @@ #distance { property:{EncounterDto.PROPERTY_DISTANCE}; - model:{tableEditBean.getDistance()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getDistance()}; } #comment { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jaxx index 2e54977..b513174 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jaxx @@ -33,8 +33,8 @@ fr.ird.observe.services.dto.referential.longline.LineTypeDto fr.ird.observe.application.swing.ui.content.table.* - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue static org.nuiton.i18n.I18n.n @@ -83,7 +83,7 @@ <JLabel id='lengthLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='length' constructorParams='this'/> + <NumberEditor id='length' constructorParams='this' styleClass="float3"/> </cell> </row> @@ -93,7 +93,7 @@ <JLabel id='proportionLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='proportion' constructorParams='this'/> + <NumberEditor id='proportion' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jcss index ac510eb..b4e74ba 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/FloatlinesCompositionUI.jcss @@ -38,8 +38,7 @@ #length { property:{FloatlinesCompositionDto.PROPERTY_LENGTH}; - model:{tableEditBean.getLength()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getLength()}; _validatorLabel:{t("observe.content.floatlinesComposition.length")}; } @@ -50,8 +49,7 @@ #proportion { property:{FloatlinesCompositionDto.PROPERTY_PROPORTION}; - model:{tableEditBean.getProportion()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getProportion()}; _validatorLabel:{t("observe.content.floatlinesComposition.proportion")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jaxx index d0e7608..279aec8 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jaxx @@ -37,8 +37,8 @@ fr.ird.observe.application.swing.ui.util.BooleanEditor fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -103,7 +103,7 @@ <JLabel id='numberLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='number' constructorParams='this'/> + <NumberEditor id='number' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jcss index 712855e..6a9c189 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/GearUseFeaturesLonglineUI.jcss @@ -52,8 +52,7 @@ #number { property:{GearUseFeaturesLonglineDto.PROPERTY_NUMBER}; - model:{tableEditBean.getNumber()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getNumber()}; } #usedInTripLabel { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jaxx index 2161b13..550e6ef 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jaxx @@ -34,8 +34,8 @@ fr.ird.observe.services.dto.referential.longline.HookSizeDto fr.ird.observe.application.swing.ui.content.table.* - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox static fr.ird.observe.application.swing.ui.UIHelper.getStringValue static org.nuiton.i18n.I18n.n @@ -94,7 +94,7 @@ <JLabel id='hookOffsetLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='hookOffset' constructorParams='this'/> + <NumberEditor id='hookOffset' constructorParams='this' styleClass="int6"/> </cell> </row> @@ -104,7 +104,7 @@ <JLabel id='proportionLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='proportion' constructorParams='this'/> + <NumberEditor id='proportion' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jcss index e40fe95..fcd0441 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/HooksCompositionUI.jcss @@ -50,8 +50,7 @@ #hookOffset { property:{HooksCompositionDto.PROPERTY_HOOK_OFFSET}; - model:{tableEditBean.getHookOffset()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getHookOffset()}; _validatorLabel:{t("observe.content.hooksComposition.hookOffset")}; } @@ -62,8 +61,7 @@ #proportion { property:{HooksCompositionDto.PROPERTY_PROPORTION}; - model:{tableEditBean.getProportion()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getProportion()}; _validatorLabel:{t("observe.content.hooksComposition.proportion")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/LonglinePositionHelper.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/LonglinePositionHelper.java index 774a7ce..3e72bfd 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/LonglinePositionHelper.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/LonglinePositionHelper.java @@ -32,7 +32,7 @@ import fr.ird.observe.services.dto.longline.LonglinePositionAwareDto; import fr.ird.observe.services.dto.longline.LonglinePositionSetDto; import fr.ird.observe.services.dto.longline.SectionDto; import fr.ird.observe.services.dto.reference.DataReference; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import java.beans.PropertyChangeListener; import java.util.Collection; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUI.jaxx index fc6ff88..2ceb346 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUI.jaxx @@ -36,7 +36,7 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUIHandler.java index 847ade9..2d5b159 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/SensorUsedUIHandler.java @@ -41,7 +41,7 @@ import fr.ird.observe.services.service.data.longline.ActivityLongLineSensorUsedS import org.nuiton.jaxx.runtime.spi.UIHandler; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.jaxx.runtime.JaxxFileChooser; +import org.nuiton.jaxx.widgets.file.JaxxFileChooser; import javax.swing.JOptionPane; import javax.swing.JTable; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jaxx index ea7e3a5..049ad53 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jaxx @@ -39,8 +39,8 @@ fr.ird.observe.services.dto.referential.longline.SensorBrandDto fr.ird.observe.application.swing.ui.content.table.* - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.nuiton.jaxx.widgets.select.FilterableDoubleList org.nuiton.jaxx.widgets.datetime.DateTimeEditor @@ -231,7 +231,7 @@ <JLabel id='floatline1LengthLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='floatline1Length' constructorParams='this' styleClass='float'/> + <NumberEditor id='floatline1Length' constructorParams='this' styleClass='float3'/> </cell> </row> @@ -241,7 +241,7 @@ <JLabel id='floatline2LengthLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='floatline2Length' constructorParams='this' styleClass='float'/> + <NumberEditor id='floatline2Length' constructorParams='this' styleClass='float3'/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jcss index 6fa9128..83bfbba 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUI.jcss @@ -189,8 +189,7 @@ #floatline1Length { property:{TdrDto.PROPERTY_FLOATLINE1_LENGTH}; - model:{tableEditBean.getFloatline1Length()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getFloatline1Length()}; _validatorLabel: {t("observe.content.tdr.floatline1Length")}; } @@ -201,8 +200,7 @@ #floatline2Length { property:{TdrDto.PROPERTY_FLOATLINE2_LENGTH}; - model:{tableEditBean.getFloatline2Length()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getFloatline2Length()}; _validatorLabel: {t("observe.content.tdr.floatline2Length")}; } @@ -269,7 +267,7 @@ #fishingStartDepth { property:{TdrDto.PROPERTY_FISHING_START_DEPTH}; - model:{tableEditBean.getFishingStartDepth()}; + numberValue:{tableEditBean.getFishingStartDepth()}; _validatorLabel: {t("observe.content.tdr.fishingStartDepth")}; } @@ -280,7 +278,7 @@ #fishingEndDepth { property:{TdrDto.PROPERTY_FISHING_END_DEPTH}; - model:{tableEditBean.getFishingEndDepth()}; + numberValue:{tableEditBean.getFishingEndDepth()}; _validatorLabel: {t("observe.content.tdr.fishingEndDepth")}; } @@ -291,7 +289,7 @@ #meanDeployementDepth { property:{TdrDto.PROPERTY_MEAN_DEPLOYEMENT_DEPTH}; - model:{tableEditBean.getMeanDeployementDepth()}; + numberValue:{tableEditBean.getMeanDeployementDepth()}; _validatorLabel: {t("observe.content.tdr.meanDeployementDepth")}; } @@ -302,7 +300,7 @@ #medianDeployementDepth { property:{TdrDto.PROPERTY_MEDIAN_DEPLOYEMENT_DEPTH}; - model:{tableEditBean.getMedianDeployementDepth()}; + numberValue:{tableEditBean.getMedianDeployementDepth()}; _validatorLabel: {t("observe.content.tdr.medianDeployementDepth")}; } @@ -313,7 +311,7 @@ #minFishingDepth { property:{TdrDto.PROPERTY_MIN_FISHING_DEPTH}; - model:{tableEditBean.getMinFishingDepth()}; + numberValue:{tableEditBean.getMinFishingDepth()}; _validatorLabel: {t("observe.content.tdr.minFishingDepth")}; } @@ -324,7 +322,7 @@ #maxFishingDepth { property:{TdrDto.PROPERTY_MAX_FISHING_DEPTH}; - model:{tableEditBean.getMaxFishingDepth()}; + numberValue:{tableEditBean.getMaxFishingDepth()}; _validatorLabel: {t("observe.content.tdr.maxFishingDepth")}; } @@ -335,7 +333,7 @@ #meanFishingDepth { property:{TdrDto.PROPERTY_MEAN_FISHING_DEPTH}; - model:{tableEditBean.getMeanFishingDepth()}; + numberValue:{tableEditBean.getMeanFishingDepth()}; _validatorLabel: {t("observe.content.tdr.meanFishingDepth")}; } @@ -346,7 +344,7 @@ #medianFishingDepth { property:{TdrDto.PROPERTY_MEDIAN_FISHING_DEPTH}; - model:{tableEditBean.getMedianFishingDepth()}; + numberValue:{tableEditBean.getMedianFishingDepth()}; _validatorLabel: {t("observe.content.tdr.medianFishingDepth")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUIHandler.java index 3cc67e0..5195d9b 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/longline/TdrUIHandler.java @@ -44,12 +44,12 @@ import fr.ird.observe.services.service.data.longline.TdrService; import fr.ird.observe.services.service.data.longline.TripLonglineService; import org.nuiton.jaxx.runtime.context.JAXXContextEntryDef; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.HidorButton; +import org.nuiton.jaxx.widgets.hidor.HidorButton; import org.nuiton.jaxx.validator.swing.SwingValidatorMessage; import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.jaxx.runtime.JaxxFileChooser; +import org.nuiton.jaxx.widgets.file.JaxxFileChooser; import org.nuiton.validator.NuitonValidatorScope; import javax.swing.JComponent; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss index 8aeb4fc..ddd24a7 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss @@ -115,9 +115,7 @@ JToolBar { #length { property:length; - model:{tableEditBean.getLength()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL1_PATTERN}; + numberValue:{tableEditBean.getLength()}; } #lengthSourceInformation { @@ -134,8 +132,7 @@ JToolBar { #weight { property:weight; - model:{tableEditBean.getWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; + numberValue:{tableEditBean.getWeight()}; _validatorLabel:{t("observe.common.weight.ind")}; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx index 4759e58..490f2db 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx @@ -37,8 +37,8 @@ fr.ird.observe.application.swing.ui.util.BooleanEditor fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -103,7 +103,7 @@ <JLabel id='numberLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='number' constructorParams='this'/> + <NumberEditor id='number' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jcss index 549019d..68e03e6 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jcss @@ -52,8 +52,7 @@ #number { property:{GearUseFeaturesSeineDto.PROPERTY_NUMBER}; - model:{tableEditBean.getNumber()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getNumber()}; } #usedInTripLabel { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jaxx index a3f1ea8..f3eeba1 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jaxx @@ -40,8 +40,8 @@ fr.ird.observe.application.swing.ui.util.JComment fr.ird.observe.application.swing.validation.ObserveSwingValidator - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -115,7 +115,7 @@ <JLabel id='catchWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='catchWeight' constructorParams='this'/> + <NumberEditor id='catchWeight' constructorParams='this' styleClass="float3"/> </cell> <cell anchor='east'> <JToolBar id='catchWeightComputedAction'> @@ -130,7 +130,7 @@ <JLabel id='totalCountLabel'/> </cell> <cell weightx='1'> - <NumberEditor id='totalCount' constructorParams='this'/> + <NumberEditor id='totalCount' constructorParams='this' styleClass="int6"/> </cell> <cell anchor='east'> @@ -146,7 +146,7 @@ <JLabel id='meanWeightLabel'/> </cell> <cell weightx='1'> - <NumberEditor id='meanWeight' constructorParams='this'/> + <NumberEditor id='meanWeight' constructorParams='this' styleClass="float2"/> </cell> <cell anchor='east'> <JToolBar id='meanWeightComputedAction'> @@ -161,7 +161,7 @@ <JLabel id='meanLengthLabel'/> </cell> <cell weightx='1'> - <NumberEditor id='meanLength' constructorParams='this'/> + <NumberEditor id='meanLength' constructorParams='this' styleClass="int6"/> </cell> <cell anchor='east'> <JToolBar id='meanLengthComputedAction'> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jcss index 208e6ee..162da14 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchUI.jcss @@ -81,9 +81,7 @@ #catchWeight { property:{NonTargetCatchDto.PROPERTY_CATCH_WEIGHT}; - useFloat:true; - model:{tableEditBean.getCatchWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL3_PATTERN}; + numberValue:{tableEditBean.getCatchWeight()}; } #catchWeightComputedInformation { @@ -100,8 +98,7 @@ #totalCount { property:{NonTargetCatchDto.PROPERTY_TOTAL_COUNT}; - model:{tableEditBean.getTotalCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getTotalCount()}; } #totalCountComputedInformation { @@ -118,8 +115,7 @@ #meanWeight { property:{NonTargetCatchDto.PROPERTY_MEAN_WEIGHT}; - model:{tableEditBean.getMeanWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; + numberValue:{tableEditBean.getMeanWeight()}; } #meanWeightComputedInformation { @@ -136,8 +132,7 @@ #meanLength { property:{NonTargetCatchDto.PROPERTY_MEAN_LENGTH}; - model:{tableEditBean.getMeanLength()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getMeanLength()}; } #meanLengthComputedInformation { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jaxx index 1bc5d68..1a696c1 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jaxx @@ -41,8 +41,8 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -136,7 +136,7 @@ public String getSpeciesFauneTypeTaille(ReferentialReference<SpeciesDto> species <JLabel id='lengthLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='length' constructorParams='this'/> + <NumberEditor id='length' constructorParams='this' styleClass="float1"/> </cell> <cell anchor='east'> <JToolBar id='lengthSourceAction'> @@ -151,7 +151,7 @@ public String getSpeciesFauneTypeTaille(ReferentialReference<SpeciesDto> species <JLabel id='weightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='weight' constructorParams='this'/> + <NumberEditor id='weight' constructorParams='this' styleClass="float2"/> </cell> <cell anchor='east'> <JToolBar id='weightSourceAction'> @@ -166,7 +166,7 @@ public String getSpeciesFauneTypeTaille(ReferentialReference<SpeciesDto> species <JLabel id='countLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='count' constructorParams='this'/> + <NumberEditor id='count' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss index d518302..7b0c6fd 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss @@ -50,8 +50,7 @@ #count { property:{NonTargetLengthDto.PROPERTY_COUNT}; - model:{tableEditBean.getCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getCount()}; } #picturesReferencesLabel { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx index 5259cc1..b627d9a 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx @@ -37,8 +37,8 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -97,7 +97,7 @@ <JLabel id='countLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='count' constructorParams='this'/> + <NumberEditor id='count' constructorParams='this' styleClass="int6"/> </cell> </row> </Table> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jcss index dd0555e..e072b12 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jcss @@ -47,8 +47,7 @@ #count { property:{ObjectObservedSpeciesDto.PROPERTY_COUNT}; - model:{tableEditBean.getCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getCount()}; } #comment { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jaxx index 982c143..521ad4f 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jaxx @@ -36,8 +36,8 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -85,7 +85,7 @@ <JLabel id='totalWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='totalWeight' constructorParams='this'/> + <NumberEditor id='totalWeight' constructorParams='this' styleClass="int6"/> </cell> </row> </Table> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jcss index 1e73348..1647150 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/ObjectSchoolEstimateUI.jcss @@ -37,8 +37,7 @@ #totalWeight { property:{ObjectSchoolEstimateDto.PROPERTY_TOTAL_WEIGHT}; - model:{tableEditBean.getTotalWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getTotalWeight()}; } #comment { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jaxx index e58258d..05c4da7 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jaxx @@ -36,8 +36,8 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -88,7 +88,7 @@ <JLabel id='totalWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='totalWeight' constructorParams='this'/> + <NumberEditor id='totalWeight' constructorParams='this' styleClass="int7"/> </cell> </row> @@ -98,7 +98,7 @@ <JLabel id='meanWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='meanWeight' constructorParams='this'/> + <NumberEditor id='meanWeight' constructorParams='this' styleClass="int6"/> </cell> </row> </Table> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jcss index 6220acb..3b0b5db 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/SchoolEstimateUI.jcss @@ -39,8 +39,7 @@ #totalWeight { property:{SchoolEstimateDto.PROPERTY_TOTAL_WEIGHT}; - model:{tableEditBean.getTotalWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_7_DIGITS_PATTERN}; + numberValue:{tableEditBean.getTotalWeight()}; } #meanWeightLabel { @@ -50,8 +49,7 @@ #meanWeight { property:{SchoolEstimateDto.PROPERTY_MEAN_WEIGHT}; - model:{tableEditBean.getMeanWeight()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getMeanWeight()}; } #comment { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jaxx index 8cfb432..fbd632f 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jaxx @@ -37,8 +37,8 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.apache.commons.lang3.BooleanUtils @@ -103,7 +103,7 @@ <JLabel id='catchWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='catchWeight' constructorParams='this'/> + <NumberEditor id='catchWeight' constructorParams='this' styleClass="float4"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jcss index 46eb2c8..2343bca 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUI.jcss @@ -55,9 +55,7 @@ #catchWeight { property:{TargetCatchDto.PROPERTY_CATCH_WEIGHT}; - model:{tableEditBean.getCatchWeight()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL4_PATTERN}; + numberValue:{tableEditBean.getCatchWeight()}; } #wellLabel { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUIHandler.java index 9e752f2..6a834ec 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetCatchUIHandler.java @@ -44,7 +44,7 @@ import fr.ird.observe.services.dto.seine.TargetCatchHelper; import fr.ird.observe.services.service.data.seine.TargetCatchService; import fr.ird.observe.services.service.data.seine.TripSeineService; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.decorator.Decorator; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jaxx index 426d10d..200de4d 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jaxx @@ -39,8 +39,8 @@ fr.ird.observe.application.swing.ui.util.BooleanEditor fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox org.apache.commons.lang3.BooleanUtils @@ -114,7 +114,7 @@ <JLabel id='catchWeightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='catchWeight' constructorParams='this'/> + <NumberEditor id='catchWeight' constructorParams='this' styleClass="float4"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jcss index ee58337..1ad6c50 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUI.jcss @@ -67,9 +67,7 @@ #catchWeight { property:{TargetCatchDto.PROPERTY_CATCH_WEIGHT}; - model:{tableEditBean.getCatchWeight()}; - useFloat:true; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL4_PATTERN}; + numberValue:{tableEditBean.getCatchWeight()}; } #broughtOnDeckInformation { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java index 571e0ae..7eeba6d 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetDiscardCatchUIHandler.java @@ -45,7 +45,7 @@ import fr.ird.observe.services.dto.seine.TargetCatchHelper; import fr.ird.observe.services.service.data.seine.TargetCatchService; import fr.ird.observe.services.service.data.seine.TripSeineService; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.decorator.Decorator; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx index 1918fa3..2956201 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx @@ -36,8 +36,8 @@ fr.ird.observe.application.swing.ui.content.table.* fr.ird.observe.application.swing.ui.util.JComment - org.nuiton.jaxx.runtime.swing.editor.NumberEditor - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.number.NumberEditor + org.nuiton.jaxx.widgets.select.BeanComboBox java.awt.Dimension @@ -138,7 +138,7 @@ public String getLengthDataTip(boolean computed) { <JLabel id='lengthLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='length' constructorParams='this'/> + <NumberEditor id='length' constructorParams='this' styleClass="float1"/> </cell> <cell anchor='east'> <JToolBar id='lengthSourceAction'> @@ -153,7 +153,7 @@ public String getLengthDataTip(boolean computed) { <JLabel id='weightLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='weight' constructorParams='this'/> + <NumberEditor id='weight' constructorParams='this' styleClass="float2"/> </cell> <cell anchor='east'> <JToolBar id='weightSourceAction'> @@ -168,7 +168,7 @@ public String getLengthDataTip(boolean computed) { <JLabel id='countLabel'/> </cell> <cell weightx='1' anchor='east'> - <NumberEditor id='count' constructorParams='this'/> + <NumberEditor id='count' constructorParams='this' styleClass="int6"/> </cell> </row> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jcss index 84c9cb5..cc038d5 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jcss @@ -45,8 +45,7 @@ #count { property:"count"; - model:{tableEditBean.getCount()}; - numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; + numberValue:{tableEditBean.getCount()}; } #comment { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUI.jaxx index bd65549..09cecc0 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUI.jaxx @@ -25,7 +25,7 @@ fr.ird.observe.services.dto.presets.RemoteDataSourceConfiguration fr.ird.observe.services.dto.presets.ServerDataSourceConfiguration - org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox + org.nuiton.jaxx.widgets.select.BeanComboBox </import> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUIHandler.java index 77d99c4..f98a419 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/presets/RemotePresetsUIHandler.java @@ -41,7 +41,7 @@ import fr.ird.observe.services.security.UserLoginNotFoundException; import fr.ird.observe.services.security.UserPasswordNotFoundException; import fr.ird.observe.services.service.PingService; import org.nuiton.jaxx.runtime.spi.UIHandler; -import org.nuiton.jaxx.runtime.swing.editor.bean.BeanComboBox; +import org.nuiton.jaxx.widgets.select.BeanComboBox; import org.nuiton.decorator.Decorator; import org.nuiton.decorator.JXPathDecorator; import org.nuiton.version.Version; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/table/EditableTableModelSupport.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/table/EditableTableModelSupport.java index 512a247..d56a23c 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/table/EditableTableModelSupport.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/util/table/EditableTableModelSupport.java @@ -23,10 +23,10 @@ package fr.ird.observe.application.swing.ui.util.table; */ import fr.ird.observe.application.swing.ui.UIHelper; -import org.nuiton.jaxx.runtime.swing.editor.cell.NumberCellEditor; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.autocomplete.ComboBoxCellEditor; +import org.nuiton.jaxx.widgets.number.NumberCellEditor; import javax.swing.JTable; import javax.swing.ListSelectionModel; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ObserveSwingValidator.java b/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ObserveSwingValidator.java index 6058eae..bc2ebf5 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ObserveSwingValidator.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ObserveSwingValidator.java @@ -36,7 +36,7 @@ import java.util.Objects; /** * Une surcharge du validateur swing offert par jaxx pour pouvoir ajouter dans - * la stack le DataContext (pour faire de la validation sur le context de + * la stack le context (pour faire de la validation sur le context de * données d'un niveau supérieur (valider une marée à partir d'une route par * exemple). * diff --git a/pom.xml b/pom.xml index fb48393..df60aad 100644 --- a/pom.xml +++ b/pom.xml @@ -160,7 +160,7 @@ <processorPluginVersion>1.3</processorPluginVersion> <topiaVersion>3.2</topiaVersion> - <jaxxVersion>3.0-alpha-1</jaxxVersion> + <jaxxVersion>3.0-alpha-2</jaxxVersion> <nuitonI18nVersion>3.6.2</nuitonI18nVersion> <nuitonValidatorVersion>3.0.1</nuitonValidatorVersion> <nuitonUtilsVersion>3.0-rc-16</nuitonUtilsVersion> @@ -413,7 +413,13 @@ </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-widgets</artifactId> + <artifactId>jaxx-widgets-error</artifactId> + <version>${jaxxVersion}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-widgets-hidor</artifactId> <version>${jaxxVersion}</version> <scope>compile</scope> </dependency> @@ -449,21 +455,20 @@ </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-config</artifactId> + <artifactId>jaxx-widgets-file</artifactId> <version>${jaxxVersion}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-application-api</artifactId> + <artifactId>jaxx-widgets-status</artifactId> + <version>${jaxxVersion}</version> + </dependency> + <dependency> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-widgets-config</artifactId> <version>${jaxxVersion}</version> <scope>compile</scope> - <exclusions> - <exclusion> - <groupId>org.apache.commons</groupId> - <artifactId>commons-vfs2</artifactId> - </exclusion> - </exclusions> </dependency> <!--swingX --> diff --git a/services/pom.xml b/services/pom.xml index c94d4f5..f24de9f 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -69,12 +69,6 @@ <artifactId>gson</artifactId> </dependency> - <!-- JAXX --> - <dependency> - <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-application-api</artifactId> - </dependency> - <!-- Swingx --> <dependency> <groupId>org.swinglabs.swingx</groupId> diff --git a/services/src/main/java/fr/ird/observe/services/dto/AbstractObserveDto.java b/services/src/main/java/fr/ird/observe/services/dto/AbstractObserveDto.java index 8c5b8ba..799102d 100644 --- a/services/src/main/java/fr/ird/observe/services/dto/AbstractObserveDto.java +++ b/services/src/main/java/fr/ird/observe/services/dto/AbstractObserveDto.java @@ -23,7 +23,6 @@ package fr.ird.observe.services.dto; */ import org.jdesktop.beans.AbstractSerializableBean; -import org.nuiton.jaxx.application.bean.JavaBeanObject; import org.nuiton.util.CollectionUtil; import java.util.Collection; @@ -34,7 +33,7 @@ import java.util.Collection; * @author Tony Chemit - dev@tchemit.fr * @since 7.0 */ -public abstract class AbstractObserveDto extends AbstractSerializableBean implements JavaBeanObject { +public abstract class AbstractObserveDto extends AbstractSerializableBean { private static final long serialVersionUID = 1L; @@ -46,7 +45,6 @@ public abstract class AbstractObserveDto extends AbstractSerializableBean implem return CollectionUtil.getOrNull(child, index); } - @Override public void firePropertyChanged(String propertyName, Object oldValue, Object newValue) { diff --git a/services/src/main/java/fr/ird/observe/services/dto/referential/ReferentialMultimap.java b/services/src/main/java/fr/ird/observe/services/dto/referential/ReferentialMultimap.java index fdd07de..d0ee0a0 100644 --- a/services/src/main/java/fr/ird/observe/services/dto/referential/ReferentialMultimap.java +++ b/services/src/main/java/fr/ird/observe/services/dto/referential/ReferentialMultimap.java @@ -27,17 +27,15 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSetMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Multiset; -import com.google.common.collect.SetMultimap; import java.util.Collection; -import java.util.Map; import java.util.Objects; /** * @author smaisonneuve * Created on 17/08/16. */ -public class ReferentialMultimap<K extends ReferentialDto> implements SetMultimap<Class<K>, K> { +public class ReferentialMultimap<K extends ReferentialDto> { private ImmutableSetMultimap<Class<K>, K> immutableSetMultimap; @@ -93,92 +91,87 @@ public class ReferentialMultimap<K extends ReferentialDto> implements SetMultima immutableSetMultimap = ImmutableSetMultimap.copyOf(multimap); } - @Override public ImmutableSet<K> get(Class<K> key) { return immutableSetMultimap.get(key); } - @Override - public ImmutableSet<Class<K>> keySet() { - return immutableSetMultimap.keySet(); - } - - @Override + // @Override +// public ImmutableSet<Class<K>> keySet() { +// return immutableSetMultimap.keySet(); +// } +// public Multiset<Class<K>> keys() { return immutableSetMultimap.keys(); } - @Override - public Collection<K> values() { - return immutableSetMultimap.values(); - } - - @Override - public ImmutableSet<K> removeAll(Object key) { - return immutableSetMultimap.removeAll(key); - } - - @Override - public void clear() { - immutableSetMultimap.clear(); - } - - @Override + // @Override +// public Collection<K> values() { +// return immutableSetMultimap.values(); +// } +// +// @Override +// public ImmutableSet<K> removeAll(Object key) { +// return immutableSetMultimap.removeAll(key); +// } +// +// @Override +// public void clear() { +// immutableSetMultimap.clear(); +// } +// public int size() { return immutableSetMultimap.size(); } - @Override public boolean isEmpty() { return immutableSetMultimap.isEmpty(); } - - @Override - public boolean containsKey(Object key) { - return immutableSetMultimap.containsKey(key); - } - - @Override - public boolean containsValue(Object value) { - return immutableSetMultimap.containsValue(value); - } - - @Override - public boolean containsEntry(Object key, Object value) { - return immutableSetMultimap.containsEntry(key, value); - } - - @Override - public boolean put(Class<K> key, K value) { - return immutableSetMultimap.put(key, value); - } - - @Override - public boolean remove(Object key, Object value) { - return immutableSetMultimap.remove(key, value); - } - - @Override - public boolean putAll(Class<K> key, Iterable<? extends K> values) { - return immutableSetMultimap.putAll(key, values); - } - - @Override - public boolean putAll(Multimap<? extends Class<K>, ? extends K> multimap) { - return immutableSetMultimap.putAll(multimap); - } - - @Override - public ImmutableSet<K> replaceValues(Class<K> key, Iterable<? extends K> values) { - return immutableSetMultimap.replaceValues(key, values); - } - - @Override - public ImmutableSet<Map.Entry<Class<K>, K>> entries() { - return immutableSetMultimap.entries(); - } - - @Override +// +// @Override +// public boolean containsKey(Object key) { +// return immutableSetMultimap.containsKey(key); +// } +// +// @Override +// public boolean containsValue(Object value) { +// return immutableSetMultimap.containsValue(value); +// } +// +// @Override +// public boolean containsEntry(Object key, Object value) { +// return immutableSetMultimap.containsEntry(key, value); +// } +// +// @Override +// public boolean put(Class<K> key, K value) { +// return immutableSetMultimap.put(key, value); +// } +// +// @Override +// public boolean remove(Object key, Object value) { +// return immutableSetMultimap.remove(key, value); +// } +// +// @Override +// public boolean putAll(Class<K> key, Iterable<? extends K> values) { +// return immutableSetMultimap.putAll(key, values); +// } +// +// @Override +// public boolean putAll(Multimap<? extends Class<K>, ? extends K> multimap) { +// return immutableSetMultimap.putAll(multimap); +// } +// +// @Override +// public ImmutableSet<K> replaceValues(Class<K> key, Iterable<? extends K> values) { +// return immutableSetMultimap.replaceValues(key, values); +// } +// +// @Override +// public ImmutableSet<Map.Entry<Class<K>, K>> entries() { +// return immutableSetMultimap.entries(); +// } +// public ImmutableMap<Class<K>, Collection<K>> asMap() { return immutableSetMultimap.asMap(); } diff --git a/services/src/main/java/fr/ird/observe/services/gson/ClassAdapter.java b/services/src/main/java/fr/ird/observe/services/gson/ClassAdapter.java index fe79904..361c8f8 100644 --- a/services/src/main/java/fr/ird/observe/services/gson/ClassAdapter.java +++ b/services/src/main/java/fr/ird/observe/services/gson/ClassAdapter.java @@ -61,9 +61,7 @@ public class ClassAdapter implements JsonSerializer<Class<?>>, JsonDeserializer< public Class<?> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { String className = json.getAsString(); - Class<?> result = CLASS_CACHE.computeIfAbsent(className, k -> loadClass(className)); - - return result; + return CLASS_CACHE.computeIfAbsent(className, k -> loadClass(className)); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.