branch feature/7856 created (now 277a2ee)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7856 in repository tutti. See http://git.codelutin.com/tutti.git at 277a2ee sélection du premier éléménent de la combo quand on arrive sur l'ecran à partir du menu en haut de l'ecran (fixes #7856) This branch includes the following new commits: new 277a2ee sélection du premier éléménent de la combo quand on arrive sur l'ecran à partir du menu en haut de l'ecran (fixes #7856) 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 277a2ee527743d4a55f0f406c930c2460d06bab5 Author: Kevin Morin <morin@codelutin.com> Date: Wed Dec 23 12:09:19 2015 +0100 sélection du premier éléménent de la combo quand on arrive sur l'ecran à partir du menu en haut de l'ecran (fixes #7856) -- 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 feature/7856 in repository tutti. See http://git.codelutin.com/tutti.git commit 277a2ee527743d4a55f0f406c930c2460d06bab5 Author: Kevin Morin <morin@codelutin.com> Date: Wed Dec 23 12:09:19 2015 +0100 sélection du premier éléménent de la combo quand on arrive sur l'ecran à partir du menu en haut de l'ecran (fixes #7856) --- .../EditCatchesForSelectedCruiseAction.java | 34 ++++++++++++++++++++++ .../content/home/actions/EditCatchesAction.java | 8 ++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/actions/EditCatchesForSelectedCruiseAction.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/actions/EditCatchesForSelectedCruiseAction.java index 3c95500..b9cf1f3 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/actions/EditCatchesForSelectedCruiseAction.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/actions/EditCatchesForSelectedCruiseAction.java @@ -23,12 +23,18 @@ package fr.ifremer.tutti.ui.swing.content.actions; */ import com.google.common.base.Preconditions; +import fr.ifremer.tutti.persistence.entities.data.FishingOperation; import fr.ifremer.tutti.service.ValidationService; import fr.ifremer.tutti.ui.swing.TuttiScreen; import fr.ifremer.tutti.ui.swing.content.MainUIHandler; +import fr.ifremer.tutti.ui.swing.content.operation.EditFishingOperationUI; +import fr.ifremer.tutti.ui.swing.content.operation.FishingOperationsUI; +import jaxx.runtime.swing.editor.bean.BeanFilterableComboBox; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import javax.swing.*; + /** * Opens the operations edition screen to edit the selected operations. * @@ -56,4 +62,32 @@ public class EditCatchesForSelectedCruiseAction extends AbstractChangeScreenActi super.doAction(); } + @Override + public void postSuccessAction() { + super.postSuccessAction(); + + SwingUtilities.invokeLater( + new Runnable() { + @Override + public void run() { + + FishingOperationsUI currentBody = (FishingOperationsUI) getHandler().getCurrentBody(); + + BeanFilterableComboBox<FishingOperation> comboBox = currentBody.getFishingOperationComboBox(); + if (!comboBox.isEmpty()) { + FishingOperation selectedOperation = comboBox.getData().get(0); + currentBody.getModel().setSelectedFishingOperation(selectedOperation); + } + + EditFishingOperationUI fishingOperationTabContent = currentBody.getFishingOperationTabContent(); + + JComponent componentToFocus = fishingOperationTabContent.getHandler().getComponentToFocus(); + componentToFocus.requestFocusInWindow(); + + } + } + ); + + } + } diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/actions/EditCatchesAction.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/actions/EditCatchesAction.java index 214ad40..3524297 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/actions/EditCatchesAction.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/actions/EditCatchesAction.java @@ -72,15 +72,15 @@ public class EditCatchesAction extends AbstractChangeScreenAction { @Override public void run() { - FishingOperationsUI currentBoby = (FishingOperationsUI) getHandler().getCurrentBody(); + FishingOperationsUI currentBody = (FishingOperationsUI) getHandler().getCurrentBody(); - BeanFilterableComboBox<FishingOperation> comboBox = currentBoby.getFishingOperationComboBox(); + BeanFilterableComboBox<FishingOperation> comboBox = currentBody.getFishingOperationComboBox(); if (!comboBox.isEmpty()) { FishingOperation selectedOperation = comboBox.getData().get(0); - currentBoby.getModel().setSelectedFishingOperation(selectedOperation); + currentBody.getModel().setSelectedFishingOperation(selectedOperation); } - EditFishingOperationUI fishingOperationTabContent = currentBoby.getFishingOperationTabContent(); + EditFishingOperationUI fishingOperationTabContent = currentBody.getFishingOperationTabContent(); JComponent componentToFocus = fishingOperationTabContent.getHandler().getComponentToFocus(); componentToFocus.requestFocusInWindow(); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm