branch develop updated (c54d9e5 -> d0824a7)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git from c54d9e5 [ui] optimize sort new d0824a7 fixes #7204 [PS/LL] Séparer les programmes LL et PS dans l'arbre de navigation The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit d0824a7ab848a4b17a155545dd911593d382c13e Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Nov 27 10:07:55 2016 +0100 fixes #7204 [PS/LL] Séparer les programmes LL et PS dans l'arbre de navigation Summary of changes: .../ird/observe/application/swing/ui/ObserveMainUI.jaxx | 6 +++++- .../ird/observe/application/swing/ui/ObserveMainUI.jcss | 7 +++++++ .../application/swing/ui/ObserveMainUIHandler.java | 16 +++++++++++++++- .../ui/tree/navigation/NavigationTreeHeaderHandler.java | 2 ++ .../resources/i18n/application-swing_en_GB.properties | 1 + .../resources/i18n/application-swing_es_ES.properties | 1 + .../resources/i18n/application-swing_fr_FR.properties | 1 + 7 files changed, 32 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
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 d0824a7ab848a4b17a155545dd911593d382c13e Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Nov 27 10:07:55 2016 +0100 fixes #7204 [PS/LL] Séparer les programmes LL et PS dans l'arbre de navigation --- .../ird/observe/application/swing/ui/ObserveMainUI.jaxx | 6 +++++- .../ird/observe/application/swing/ui/ObserveMainUI.jcss | 7 +++++++ .../application/swing/ui/ObserveMainUIHandler.java | 16 +++++++++++++++- .../ui/tree/navigation/NavigationTreeHeaderHandler.java | 2 ++ .../resources/i18n/application-swing_en_GB.properties | 1 + .../resources/i18n/application-swing_es_ES.properties | 1 + .../resources/i18n/application-swing_fr_FR.properties | 1 + 7 files changed, 32 insertions(+), 2 deletions(-) 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 faff734..c1c201b 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 @@ -262,7 +262,11 @@ void $afterCompleteSetup() { <!-- right up : content --> - <JPanel id="content"/> + <JPanel id="content"> + <JPanel id="emptySelection" constraints='"emptySelection"' layout="{new BorderLayout()}"> + <JLabel id="emptySelectionLabel" constraints="BorderLayout.CENTER"/> + </JPanel> + </JPanel> <!-- right down : message view --> <JXTitledPanel id='messageView'> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jcss index ef1ee0e..057f220 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jcss @@ -466,3 +466,10 @@ JSplitPane { layout: {new BoxLayout(toolbar, 0)}; enabled: {!isBusy()}; } + +#emptySelectionLabel { + horizontalAlignment : {JLabel.CENTER}; + verticalAlignment : {JLabel.CENTER}; + enabled:false; + text:"observe.content.selection.empty"; +} \ No newline at end of file diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIHandler.java index 545ab02..dfcbbea 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIHandler.java @@ -57,6 +57,7 @@ import javax.swing.SwingUtilities; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.TreePath; +import java.awt.Component; import java.awt.Cursor; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -79,6 +80,8 @@ public class ObserveMainUIHandler { /** Logger */ private static final Log log = LogFactory.getLog(ObserveMainUIHandler.class); + private static final String EMPTY_SELECTION = "emptySelection"; + public void changeNavigationNode(ObserveMainUI ui, TreeSelectionEvent event) { ObserveSwingDataSource source = ObserveSwingApplicationContext.get().getDataSourcesManager().getMainDataSource(); @@ -92,8 +95,19 @@ public class ObserveMainUIHandler { } if (ui.getNavigation().isSelectionEmpty()) { if (log.isDebugEnabled()) { - log.debug("No selection, do nothing..."); + log.debug("No selection, show empty panel..."); + } + + boolean foundEmptySelection = false; + for (Component component : ui.getContent().getComponents()) { + if (component.getName().equals(EMPTY_SELECTION)) { + foundEmptySelection = true; + } + } + if (!foundEmptySelection) { + ui.getContent().add(ui.getEmptySelection(), EMPTY_SELECTION); } + ui.getContentLayout().show(ui.getContent(), EMPTY_SELECTION); return; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/tree/navigation/NavigationTreeHeaderHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/tree/navigation/NavigationTreeHeaderHandler.java index 02c63c2..b1e7e9a 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/tree/navigation/NavigationTreeHeaderHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/tree/navigation/NavigationTreeHeaderHandler.java @@ -60,6 +60,8 @@ public class NavigationTreeHeaderHandler implements UIHandler<NavigationTreeHead NavigationTreeNodeSupport<?> selectedNode = getTree().getSelectedNode(); + getTree().clearSelection(); + boolean showSeine = ui.getShowSeine().isSelected(); boolean showLongline = ui.getShowLongline().isSelected(); boolean showReferential = ui.getShowReferential().isSelected(); diff --git a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties index 37d2acb..8021417 100644 --- a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties +++ b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties @@ -1079,6 +1079,7 @@ observe.content.section.cant.delete.message=The current section can not be delet observe.content.section.cant.delete.title=Can't delete section observe.content.sectionTemplate.delete.message=Confirm to delete current template. observe.content.sections.delete.message=Confirm to delete all sections. +observe.content.selection.empty=< Please select a node in the navigation tree > observe.content.sensorUsed.action.create=Insert the sensor observe.content.sensorUsed.action.create.tip=Insert this new sensor used observe.content.sensorUsed.action.reset.dataLocation.tip=Reset data location diff --git a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties index 8cc8705..37676e1 100644 --- a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties +++ b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties @@ -1079,6 +1079,7 @@ observe.content.section.cant.delete.message=La sección no puede ser eliminada p observe.content.section.cant.delete.title=Impossible de eliminar la sección observe.content.sectionTemplate.delete.message=Confirmar la eliminación del template seleccionada. observe.content.sections.delete.message=Confirmar la eliminación de todas las secciones. +observe.content.selection.empty=< Veuillez sélectionner un nœud dans l'arbre de navigation > \#TODO observe.content.sensorUsed.action.create=Insertar este sensor observe.content.sensorUsed.action.create.tip=Insertar este sensor observe.content.sensorUsed.action.reset.dataLocation.tip=Reiniciar diff --git a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties index 2768968..0569c2b 100644 --- a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties +++ b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties @@ -1079,6 +1079,7 @@ observe.content.section.cant.delete.message=La section ne peut pas être supprim observe.content.section.cant.delete.title=Impossible de supprimer la section observe.content.sectionTemplate.delete.message=Confirmer la suppression de la template sélectionnée. observe.content.sections.delete.message=Confirmer la suppression de toutes les sections. +observe.content.selection.empty=< Veuillez sélectionner un nœud dans l'arbre de navigation > observe.content.sensorUsed.action.create=Insérer ce capteur observe.content.sensorUsed.action.create.tip=Insérer ce capteur observe.content.sensorUsed.action.reset.dataLocation.tip=Réinitialiser -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm