Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

6 changed files:

Changes:

  • application-swing/src/main/java/fr/ird/observe/application/swing/ObserveRunner.java
    ... ... @@ -571,9 +571,7 @@ public abstract class ObserveRunner extends ApplicationRunner {
    571 571
     
    
    572 572
             ObserveMainUI ui = ObserveMainUIInitializer.initUI(context, config);
    
    573 573
     
    
    574
    -        UIHelper.setMainUIVisible(ui);
    
    575
    -
    
    576
    -        context.getSwingSessionHelper().addComponent(ui, false);
    
    574
    +        ObserveMainUIInitializer.setMainUIVisible(context,ui, false);
    
    577 575
             return ui;
    
    578 576
         }
    
    579 577
     
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIInitializer.java
    ... ... @@ -42,6 +42,29 @@ import fr.ird.observe.application.swing.ui.tree.navigation.nodes.StringNavigatio
    42 42
     import fr.ird.observe.application.swing.ui.util.ObserveSwingValidatorMessageTableModel;
    
    43 43
     import fr.ird.observe.application.swing.ui.util.ObserveValidatorMessageTableRenderer;
    
    44 44
     import fr.ird.observe.services.dto.constants.ReferentialLocale;
    
    45
    +import java.awt.Component;
    
    46
    +import java.awt.Container;
    
    47
    +import java.awt.Cursor;
    
    48
    +import java.awt.Dimension;
    
    49
    +import java.awt.event.ComponentAdapter;
    
    50
    +import java.awt.event.ComponentEvent;
    
    51
    +import java.awt.event.KeyEvent;
    
    52
    +import java.awt.event.MouseAdapter;
    
    53
    +import java.awt.event.MouseEvent;
    
    54
    +import java.util.ArrayList;
    
    55
    +import java.util.List;
    
    56
    +import java.util.Locale;
    
    57
    +import java.util.Objects;
    
    58
    +import javax.swing.AbstractButton;
    
    59
    +import javax.swing.JComponent;
    
    60
    +import javax.swing.JSplitPane;
    
    61
    +import javax.swing.JTree;
    
    62
    +import javax.swing.KeyStroke;
    
    63
    +import javax.swing.SwingUtilities;
    
    64
    +import javax.swing.border.Border;
    
    65
    +import javax.swing.border.LineBorder;
    
    66
    +import javax.swing.event.TreeSelectionEvent;
    
    67
    +import javax.swing.tree.TreePath;
    
    45 68
     import org.apache.commons.logging.Log;
    
    46 69
     import org.apache.commons.logging.LogFactory;
    
    47 70
     import org.nuiton.i18n.I18n;
    
    ... ... @@ -50,17 +73,6 @@ import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel;
    50 73
     import org.nuiton.jaxx.validator.swing.SwingValidatorUtil;
    
    51 74
     import org.nuiton.jaxx.widgets.error.ErrorDialogUI;
    
    52 75
     
    
    53
    -import javax.swing.*;
    
    54
    -import javax.swing.border.Border;
    
    55
    -import javax.swing.border.LineBorder;
    
    56
    -import javax.swing.event.TreeSelectionEvent;
    
    57
    -import javax.swing.tree.TreePath;
    
    58
    -import java.awt.*;
    
    59
    -import java.awt.event.*;
    
    60
    -import java.util.ArrayList;
    
    61
    -import java.util.List;
    
    62
    -import java.util.Locale;
    
    63
    -import java.util.Objects;
    
    64 76
     
    
    65 77
     import static fr.ird.observe.application.swing.ui.content.ContentUIInitializer.OBSERVE_ACTION;
    
    66 78
     import static org.nuiton.i18n.I18n.t;
    
    ... ... @@ -81,11 +93,11 @@ public class ObserveMainUIInitializer {
    81 93
     
    
    82 94
         private final ObserveMainUI ui;
    
    83 95
     
    
    84
    -    public ObserveMainUIInitializer(ObserveMainUI ui) {
    
    96
    +    ObserveMainUIInitializer(ObserveMainUI ui) {
    
    85 97
             this.ui = ui;
    
    86 98
         }
    
    87 99
     
    
    88
    -    public void changeNavigationNode(TreeSelectionEvent event) {
    
    100
    +    private void changeNavigationNode(TreeSelectionEvent event) {
    
    89 101
     
    
    90 102
             ObserveSwingDataSource source = ObserveSwingApplicationContext.get().getDataSourcesManager().getMainDataSource();
    
    91 103
             if (source == null || !source.isOpen()) {
    
    ... ... @@ -150,7 +162,7 @@ public class ObserveMainUIInitializer {
    150 162
             }
    
    151 163
         }
    
    152 164
     
    
    153
    -    public void doOpencontent(ObserveMainUI ui, TreePath path, Class<? extends ContentUI<?, ?>> uiClass) {
    
    165
    +    private void doOpencontent(ObserveMainUI ui, TreePath path, Class<? extends ContentUI<?, ?>> uiClass) {
    
    154 166
     
    
    155 167
             ContentUIManager manager = ui.getContentUIManager();
    
    156 168
     
    
    ... ... @@ -367,10 +379,23 @@ public class ObserveMainUIInitializer {
    367 379
             }
    
    368 380
     
    
    369 381
             // show ui
    
    370
    -        UIHelper.setMainUIVisible(ui);
    
    382
    +        setMainUIVisible(rootContext, ui, true);
    
    383
    +    }
    
    384
    +
    
    385
    +    public static void setMainUIVisible(ObserveSwingApplicationContext rootContext, ObserveMainUI ui, boolean replace) {
    
    386
    +
    
    387
    +        // force le redimensionnement du splitpane
    
    388
    +        ui.getSplitpane().revalidate();
    
    389
    +
    
    390
    +        // force le redimensionnement du splitpane2
    
    391
    +        ui.getSplitpane2().revalidate();
    
    392
    +
    
    393
    +        // affichage de l'interface graphique
    
    394
    +        SwingUtilities.invokeLater(() -> ui.setVisible(true));
    
    395
    +        rootContext.getSwingSessionHelper().addComponent(ui, replace);
    
    371 396
         }
    
    372 397
     
    
    373
    -    protected void initialize() {
    
    398
    +    void initialize() {
    
    374 399
     
    
    375 400
             ObserveActionMap actionMap = ui.getObserveActionMap();
    
    376 401
     
    
    ... ... @@ -483,14 +508,14 @@ public class ObserveMainUIInitializer {
    483 508
         private Border focusBorder;
    
    484 509
         private Border noFocusBorder;
    
    485 510
     
    
    486
    -    public Border getFocusBorder() {
    
    511
    +    private Border getFocusBorder() {
    
    487 512
             if (focusBorder == null) {
    
    488 513
                 focusBorder = new LineBorder(ObserveSwingApplicationContext.get().getConfig().getFocusBorderColor(), 3, true);
    
    489 514
             }
    
    490 515
             return focusBorder;
    
    491 516
         }
    
    492 517
     
    
    493
    -    public Border getNoFocusBorder() {
    
    518
    +    private Border getNoFocusBorder() {
    
    494 519
             if (noFocusBorder == null) {
    
    495 520
                 noFocusBorder = new LineBorder(ObserveSwingApplicationContext.get().getConfig().getNoFocusBorderColor(), 3, true);
    
    496 521
             }
    
    ... ... @@ -513,7 +538,7 @@ public class ObserveMainUIInitializer {
    513 538
             }
    
    514 539
         }
    
    515 540
     
    
    516
    -    protected void updateBusyState(boolean busy) {
    
    541
    +    private void updateBusyState(boolean busy) {
    
    517 542
             if (busy) {
    
    518 543
                 // ui bloquee
    
    519 544
                 if (log.isDebugEnabled()) {
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/config/ChangeApplicationLanguageActionSupport.java
    ... ... @@ -63,6 +63,7 @@ public abstract class ChangeApplicationLanguageActionSupport extends AbstractUIA
    63 63
     
    
    64 64
                 // sauvegarde de la nouvelle locale
    
    65 65
                 config.setLocale(newLocale);
    
    66
    +            config.saveForUser();
    
    66 67
                 ObserveUICallback.ui.run();
    
    67 68
             }
    
    68 69
     
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/menu/config/ChangeDbLanguageActionSupport.java
    ... ... @@ -66,6 +66,7 @@ public abstract class ChangeDbLanguageActionSupport extends AbstractUIAction {
    66 66
     
    
    67 67
             // sauvegarde de la nouvelle locale
    
    68 68
             config.setDbLocale(newLocale.getLocale());
    
    69
    +        config.saveForUser();
    
    69 70
             ObserveUICallback.ui.run();
    
    70 71
     
    
    71 72
         }
    

  • src/site/markdown/model.md deleted
    1
    -# ObServe - model
    
    2
    -
    
    3
    -Vous trouverez sur cette page les liens vers la modélisation de la couche de persistence.
    
    4
    -
    
    5
    -Nous maintenons pour le moment deux versions de ce modèle sur le format *zargo*.
    
    6
    -
    
    7
    -## Version 5
    
    8
    -
    
    9
    -* [model commun](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v5/observe-common.zargo)
    
    10
    -* [model senne](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v5/observe-seine.zargo)
    
    11
    -* [model palangre](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v5/observe-longline.zargo)
    
    12
    -* [model properties](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v5/observe.ini)
    
    13
    -
    
    14
    -## Version 7
    
    15
    -
    
    16
    -* [model commun](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v7/observe-common.zargo)
    
    17
    -* [model senne](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v7/observe-seine.zargo)
    
    18
    -* [model palangre](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v7/observe-longline.zargo)
    
    19
    -* [model properties](https://gitlab.com/ultreiaio/ird-observe/blob/develop/doc/modelisation/zargo/v7/observe.ini)

  • src/site/site_fr.xml
    ... ... @@ -80,10 +80,13 @@
    80 80
         </menu>
    
    81 81
     
    
    82 82
         <menu name="Modélisation">
    
    83
    -      <item name="Fichier argoUML (commun)" href="model/observe-common.zargo"/>
    
    84
    -      <item name="Fichier argoUML (Seine)" href="model/observe-seine.zargo"/>
    
    85
    -      <item name="Fichier argoUML (Palangre)" href="model/observe-longline.zargo"/>
    
    86
    -      <item name="Modèle physique" href="model/observe_mpd.pdf"/>
    
    83
    +      <item name="Fichier argoUML (commun) v7" href="https://gitlab.com/ultreiaio/ird-observe/raw/develop/doc/modelisation/zargo/v7/observe-common.zargo"/>
    
    84
    +      <item name="Fichier argoUML (Seine) v7" href="https://gitlab.com/ultreiaio/ird-observe/raw/develop/doc/modelisation/zargo/v7/observe-seine.zargo"/>
    
    85
    +      <item name="Fichier argoUML (Palangre) v7" href="https://gitlab.com/ultreiaio/ird-observe/raw/develop/doc/modelisation/zargo/v7/observe-longline.zargo"/>
    
    86
    +      <item name="Fichier argoUML (commun) v5" href="https://gitlab.com/ultreiaio/ird-observe/raw/develop/doc/modelisation/zargo/v5/observe-common.zargo"/>
    
    87
    +      <item name="Fichier argoUML (Seine) v5" href="https://gitlab.com/ultreiaio/ird-observe/raw/develop/doc/modelisation/zargo/v5/observe-seine.zargo"/>
    
    88
    +      <item name="Fichier argoUML (Palangre) v5" href="https://gitlab.com/ultreiaio/ird-observe/raw/develop/doc/modelisation/zargo/v5/observe-longline.zargo"/>
    
    89
    +      <item name="Modèle physique" href="https://gitlab.com/ultreiaio/ird-observe/raw/develop/doc/modelisation/observe_mpd.pdf"/>
    
    87 90
         </menu>
    
    88 91
     
    
    89 92
         <menu ref="reports"/>