Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 026dddd3 by Tony CHEMIT at 2017-08-19T11:13:39+00:00 Permettre l'utilisation de la molette de la souris même sur des zones protégées (See #854) - - - - - 8 changed files: - client/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/admin/AdminUI.jaxx - + client/src/main/java/fr/ird/observe/client/ui/admin/AdminUIBlockingLayerUI.java - client/src/main/java/fr/ird/observe/client/ui/content/ContentUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/ContentUIBlockingLayerUI.java - client/src/main/java/fr/ird/observe/client/ui/content/table/ContentTableUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/storage/StorageUIBlockingLayerUI.java - + client/src/main/java/fr/ird/observe/client/ui/util/ObserveBlockingLayerUI.java Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx +++ b/client/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx @@ -80,10 +80,10 @@ fr.ird.observe.client.ui.tree.navigation.NavigationTree fr.ird.observe.client.ui.tree.navigation.NavigationTreeHeader fr.ird.observe.client.ui.util.UIHelper + fr.ird.observe.client.ui.util.ObserveBlockingLayerUI org.nuiton.jaxx.runtime.swing.CardLayout2 org.nuiton.jaxx.runtime.swing.CardLayout2Ext - org.nuiton.jaxx.runtime.swing.BlockingLayerUI org.nuiton.jaxx.widgets.status.StatusMessagePanel org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel @@ -126,7 +126,7 @@ <CardLayout2Ext id='bodyLayout' constructorParams='this, "body"'/> - <BlockingLayerUI id='busyBlockLayerUI'/> + <ObserveBlockingLayerUI id='busyBlockLayerUI'/> <script><![CDATA[ ===================================== client/src/main/java/fr/ird/observe/client/ui/admin/AdminUI.jaxx ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/admin/AdminUI.jaxx +++ b/client/src/main/java/fr/ird/observe/client/ui/admin/AdminUI.jaxx @@ -40,16 +40,16 @@ <AdminUIModel id='model' initializer='getContextValue(AdminUIModel.class)'/> <!-- le bloqueur d'ui utilisé par l'assistant --> - <BlockingLayerUI id='tabBusyBlockLayerUI'/> + <AdminUIBlockingLayerUI id='tabBusyBlockLayerUI' constructorParams="this"/> <!-- le bloqueur d'ui lorsqu'une action est en cours ou annulée --> - <BlockingLayerUI id='busyBlockLayerUI'/> + <AdminUIBlockingLayerUI id='busyBlockLayerUI' constructorParams="this"/> <!-- le bloqueur de changement d'opérations --> - <BlockingLayerUI id='operationBlockLayerUI'/> + <AdminUIBlockingLayerUI id='operationBlockLayerUI' constructorParams="this"/> <!-- le bloqueur de changement de configuration --> - <BlockingLayerUI id='configBlockLayerUI'/> + <AdminUIBlockingLayerUI id='configBlockLayerUI' constructorParams="this"/> <script><![CDATA[ ===================================== client/src/main/java/fr/ird/observe/client/ui/admin/AdminUIBlockingLayerUI.java ===================================== --- /dev/null +++ b/client/src/main/java/fr/ird/observe/client/ui/admin/AdminUIBlockingLayerUI.java @@ -0,0 +1,41 @@ +package fr.ird.observe.client.ui.admin; + +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.client.ui.util.ObserveBlockingLayerUI; + +/** + * Created on 09/11/16. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 6.0 + */ +class AdminUIBlockingLayerUI extends ObserveBlockingLayerUI { + + private final AdminUI ui; + + AdminUIBlockingLayerUI(AdminUI ui) { + this.ui = ui; + } + +} ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ContentUI.jaxx ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/content/ContentUI.jaxx +++ b/client/src/main/java/fr/ird/observe/client/ui/content/ContentUI.jaxx @@ -46,7 +46,6 @@ org.jdesktop.jxlayer.JXLayer - org.nuiton.jaxx.runtime.swing.BlockingLayerUI org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel javax.swing.JComboBox ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ContentUIBlockingLayerUI.java ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/content/ContentUIBlockingLayerUI.java +++ b/client/src/main/java/fr/ird/observe/client/ui/content/ContentUIBlockingLayerUI.java @@ -25,6 +25,7 @@ package fr.ird.observe.client.ui.content; import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.ObserveSwingApplicationContext; import fr.ird.observe.client.ui.actions.UIActionSupport; +import fr.ird.observe.client.ui.util.ObserveBlockingLayerUI; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; @@ -38,7 +39,6 @@ import javax.swing.SwingUtilities; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.jxlayer.JXLayer; -import org.nuiton.jaxx.runtime.swing.BlockingLayerUI; /** * Created on 09/11/16. @@ -46,7 +46,7 @@ import org.nuiton.jaxx.runtime.swing.BlockingLayerUI; * @author Tony Chemit - dev@tchemit.fr * @since 6.0 */ -public class ContentUIBlockingLayerUI extends BlockingLayerUI { +public class ContentUIBlockingLayerUI extends ObserveBlockingLayerUI { /** Logger */ private static final Log log = LogFactory.getLog(ContentUIBlockingLayerUI.class); @@ -68,7 +68,7 @@ public class ContentUIBlockingLayerUI extends BlockingLayerUI { private final ContentUI ui; - public ContentUIBlockingLayerUI(ContentUI ui) { + ContentUIBlockingLayerUI(ContentUI ui) { this.ui = ui; } ===================================== client/src/main/java/fr/ird/observe/client/ui/content/table/ContentTableUI.jaxx ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/content/table/ContentTableUI.jaxx +++ b/client/src/main/java/fr/ird/observe/client/ui/content/table/ContentTableUI.jaxx @@ -37,8 +37,8 @@ fr.ird.observe.client.ui.actions.main.global.NewNextDataGlobalUIAction fr.ird.observe.client.ui.actions.main.global.ResetDataGlobalUIAction fr.ird.observe.client.ui.actions.main.global.SaveDataGlobalUIAction + fr.ird.observe.client.ui.util.ObserveBlockingLayerUI - org.nuiton.jaxx.runtime.swing.BlockingLayerUI org.nuiton.jaxx.validator.swing.SwingValidator fr.ird.observe.services.dto.AbstractObserveDto @@ -78,7 +78,7 @@ onValueChanged='getHandler().updateEditor(event)'/> <!-- le bloqueur de l'editeur d'une entrée du tableau --> - <BlockingLayerUI id='editorBlockLayerUI'/> + <ObserveBlockingLayerUI id='editorBlockLayerUI'/> <IdDto id='tableEditBean' initializer='getModel().getTableEditBean()'/> ===================================== client/src/main/java/fr/ird/observe/client/ui/storage/StorageUIBlockingLayerUI.java ===================================== --- a/client/src/main/java/fr/ird/observe/client/ui/storage/StorageUIBlockingLayerUI.java +++ b/client/src/main/java/fr/ird/observe/client/ui/storage/StorageUIBlockingLayerUI.java @@ -25,6 +25,7 @@ package fr.ird.observe.client.ui.storage; import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.ObserveSwingApplicationContext; import fr.ird.observe.client.ui.actions.UIActionSupport; +import fr.ird.observe.client.ui.util.ObserveBlockingLayerUI; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; @@ -38,7 +39,6 @@ import javax.swing.SwingUtilities; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.jxlayer.JXLayer; -import org.nuiton.jaxx.runtime.swing.BlockingLayerUI; /** * Created on 09/11/16. @@ -46,7 +46,7 @@ import org.nuiton.jaxx.runtime.swing.BlockingLayerUI; * @author Tony Chemit - dev@tchemit.fr * @since 6.0 */ -public class StorageUIBlockingLayerUI extends BlockingLayerUI { +public class StorageUIBlockingLayerUI extends ObserveBlockingLayerUI { /** Logger */ private static final Log log = LogFactory.getLog(StorageUIBlockingLayerUI.class); ===================================== client/src/main/java/fr/ird/observe/client/ui/util/ObserveBlockingLayerUI.java ===================================== --- /dev/null +++ b/client/src/main/java/fr/ird/observe/client/ui/util/ObserveBlockingLayerUI.java @@ -0,0 +1,57 @@ +package fr.ird.observe.client.ui.util; + +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import com.google.common.collect.ImmutableSet; +import fr.ird.observe.client.ObserveSwingApplicationContext; +import fr.ird.observe.client.ui.actions.UIActionSupport; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.event.MouseWheelEvent; +import java.util.Set; +import javax.swing.Action; +import javax.swing.ActionMap; +import javax.swing.InputMap; +import javax.swing.JComponent; +import javax.swing.KeyStroke; +import javax.swing.SwingUtilities; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jdesktop.jxlayer.JXLayer; +import org.nuiton.jaxx.runtime.swing.BlockingLayerUI; + +/** + * Created on 09/11/16. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 6.0 + */ +public class ObserveBlockingLayerUI extends BlockingLayerUI { + + @Override + protected final void processMouseWheelEvent(MouseWheelEvent e, JXLayer<? extends JComponent> l) { + // never block that type of events + } + +} View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/026dddd36e299a2dd5f01708d40c... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/026dddd36e299a2dd5f01708d40c... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT