Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Mouse wheel event handler cannot be be handled running RCP app on non-development platform
Mouse wheel event handler cannot be be handled running RCP app on non-development platform [message #1833761] Fri, 23 October 2020 11:38
Hell Boy is currently offline Hell BoyFriend
Messages: 1
Registered: October 2020
Junior Member
The following code was successfully tested in a development environment running the same JRE version as the Target JDK Platform (JDK 1.6.0.45 32 Bit) on Windows 10 Enterprise 64 Bit.

There are unexpected(?) problems executing the came code in integration environment running another JRE version 1.8_60 32.

The is deployed from integration server using Java Web Start from JRE version 1.8_60 32

The mouse wheel scroll event handler is not called:

// Compiled on JDK 1.6
public class CComboUtils {
    public static void disableMouseWheel(final CCombo combo) {
        // Executed both on test (jdk 1.6) and integration (jre 1.8)
        combo.addListener(SWT.MouseWheel, new Listener() {
            public void handleEvent(Event event) {
                // Executed on test. NOT executed on integration
                System.out.println("CComboUtils.disableMouseWheel::handleEvent");
                if (event.count > 0) {
                    System.out.println("CComboUtils.disableMouseWheel::handleEvent::handleScrollUp");
                    handleScrollUp(combo, event);
                } else if (event.count < 0) {
                // Executed on test. NOT executed on integration    System.out.println("CComboUtils.disableMouseWheel::handleEvent::handleScrollDown");
                    handleScrollDown(combo, event);
                }
            }
        }); 
    }
    
    public static void handleScrollUp(CCombo combo, Event event) {
        if (combo.isFocusControl()) {
            // could be a legitimate key event, let CCombo handle it
            return;
        }
        
        event.doit = false;
    }

    public static void handleScrollDown(CCombo combo, Event event) {
        if (combo.isFocusControl()) {
            // could be a legitimate key event, let CCombo handle it
            return;
        }
        
        event.doit = false;
    }
}


The problem can be reproduced on other machines with the same OS and JRE versions.

How can I localize and solve the problem?

Is the JRE version the problem?
Is this a problem with CCombo?
Previous Topic:put a view at the editor area of a perpective by default
Next Topic:hideView() no longer working after 64-bit migration
Goto Forum:
  


Current Time: Sat Jul 27 08:52:02 GMT 2024

Powered by FUDForum. Page generated in 1.56038 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top