Skip to main content

[JAVA3D-INTEREST] WakeupOnAWTEvent doesn't support MouseWheel events?

20 replies [Last post]
Anonymous

Within my Behaviour, I use the following code at startup and at end of
each call of processStimulus:

private void restartWakeupEvents() {
WakeupOnAWTEvent wakeup = new
WakeupOnAWTEvent(AWTEvent.MOUSE_EVENT_MASK |

AWTEvent.MOUSE_MOTION_EVENT_MASK |

AWTEvent.MOUSE_WHEEL_EVENT_MASK);
this.wakeupOn(wakeup);
}

Within processStimulus there is this:

public void processStimulus(Enumeration enumeration) {
while (enumeration.hasMoreElements()) {
WakeupOnAWTEvent wakeup = (WakeupOnAWTEvent)
enumeration.nextElement();
AWTEvent events[] = wakeup.getAWTEvent();
int count = events.length;
for (int i = 0; i < count; i++) {
MouseEvent mouseEvent = (MouseEvent) events[i];
System.out.println("Stimulus: "+mouseEvent);
// other stuff .....
}
}
restartWakeupEvents();
}

I see every MouseEvent imagineable except wheel events. Unsupported?

-- Russell

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hoyaab
Offline
Joined: 2004-06-23

Pepe can I request this source ?
because I try MouseWheelEvnet on Canvas3D but I can't this so I need this source please send to me
My Email is "hoyaab@hotmail.com"

jada
Offline
Joined: 2004-03-17

Pepe,
Did you receive my emails ? I've sent you 2 followup emails on your submitted changes, but I've been getting the following WARNING messages :

**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************

The original message was received at Wed, 26 Jan 2005 14:41:14 -0700 (MST)
from [129.149.2.111]

----- Transcript of session follows -----
... Deferred: Name server: barachant.com.: host name lookup failure
Warning: message still undelivered after 4 hours
Will keep trying until message is 3 days old

pepe
Offline
Joined: 2003-06-10

weird. i'm looking at my dns and such right now...
i'll let you know rapidly.
until this problem is solved, i'll send you an email with an other address you can use (i receive 120 spam a day on that one, so i'm sure it works. ;) )

jada
Offline
Joined: 2004-03-17

That email doesn't work either. It bounced!

----- The following addresses had permanent fatal errors -----

(reason: XXXXXXX No such recipient; will not relay)

- Chien.

pepe
Offline
Joined: 2003-06-10

wow... well, i'll then be trying with an address that is not bound to my server. My isp will certainly not bounce you. you should have a mail with an address that can't be rejected. i'll look deeper into that problem right now. (but found nothing on first pass....)
[edit]server logs show no incoming messages from sun (except one from france.sun.com) that looks like a forged email for spam. *scratches head*

Message was edited by: pepe

jada
Offline
Joined: 2004-03-17

Thanks to Frederic (pepe) for his code contribution, MouseWheelEvent is added to WakeupOnAWTEvent in Java3D1.3.2-beta3.

- Chien.

Russell East

works well. Thank you!
-- Russell

java3d-interest@javadesktop.org wrote:

> Thanks to Frederic (pepe) for his code contribution, MouseWheelEvent
> is added to WakeupOnAWTEvent in Java3D1.3.2-beta3.
>
> - Chien.
> ---
> [Message sent by forum member 'jada' (Chien Yang)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=58764
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>

[reast.vcf]
---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Russell East

How about something like a subclass of EventCatcher that is
WheelEvent-aware, and is created within Canvas3D when the vm version is
>= 1.4?
-- Russell

java3d-interest@javadesktop.org wrote:

>I would.
>I've been looking, and at the moment, here is what i saw.
>Adding support for mouseWheel needs to modify BehaviorStructure, Canvas3D, EventCatcher, WakeUpOnAWTEvent and VirtualUniverse. EventCatcher would have new enableMouseWheelEvents() and disableMouseWheelEvents() methods. Other classes would have to call those methods at various places.
>There would be no need for API changes, nevertheless, due to java platform version testing (MouseWheel events are here since 1.4 only ) its use would imply more tests. I'm still wondering how to make the test efficient without setting a one time written flag. Parsing "java.specification.version" each time is not something i'll do, neither will i do it by catching exception.
>Any suggestion?
>---
>[Message sent by forum member 'pepe' (frederic barachant)]
>
>http://www.javadesktop.org/forums/thread.jspa?messageID=24056巸
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
>For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

kcr
Offline
Joined: 2004-03-17

Adding MouseWheel events to WakeupOnAWTEvent seems like a trivial fix. It should probably be added to com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior, too. Any volunteers?

-- Kevin

pepe
Offline
Joined: 2003-06-10

I would.
I've been looking, and at the moment, here is what i saw.
Adding support for mouseWheel needs to modify BehaviorStructure, Canvas3D, EventCatcher, WakeUpOnAWTEvent and VirtualUniverse. EventCatcher would have new enableMouseWheelEvents() and disableMouseWheelEvents() methods. Other classes would have to call those methods at various places.
There would be no need for API changes, nevertheless, due to java platform version testing (MouseWheel events are here since 1.4 only ) its use would imply more tests. I'm still wondering how to make the test efficient without setting a one time written flag. Parsing "java.specification.version" each time is not something i'll do, neither will i do it by catching exception.
Any suggestion?

Kevin Rushforth

Java 3D 1.3.2 requires JDK 1.4 or later, so there no need to parse the
version number for features that are in JDK 1.4.

Btw, you can look at the code in MasterControl.java for an example
(commented-out, since we don't yet need it) of doing this. Look for
"jvm15OrBetter". It parses java.version, but only does it once.

-- Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

pepe
Offline
Joined: 2003-06-10

>Java 3D 1.3.2 requires JDK 1.4 or later, so there no need to parse the
>version number for features that are in JDK 1.4.
Oh, that's a good news.
I'll look into that asap. I first need to resolve my RenderAtomInfo bug, so i don't mix file updates and mess my brain.

Russell East

Doesn't look like support for MouseEvent.MOUSE_WHEEL made it into Beta
2, right? :-(
-- Russell

java3d-interest@javadesktop.org wrote:

>>Java 3D 1.3.2 requires JDK 1.4 or later, so there no need to parse the
>>version number for features that are in JDK 1.4.
>>
>>
>Oh, that's a good news.
>I'll look into that asap. I first need to resolve my RenderAtomInfo bug, so i don't mix file updates and mess my brain.
>---
>[Message sent by forum member 'pepe' (frederic barachant)]
>
>http://www.javadesktop.org/forums/thread.jspa?messageID=24418形
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
>For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

kcr
Offline
Joined: 2004-03-17

> Doesn't look like support for MouseEvent.MOUSE_WHEEL
> made it into Beta 2, right? :-(

No. We are still waiting for whoever volunteered to fix it to do so.

-- Kevin

pepe
Offline
Joined: 2003-06-10

yep. i did volonteer for that. (forgot it, sorry)
Unfortunatly, my renderAtom bug is still there (have to get Chien so we can finish that), i now have ATI rendering bugs (pixelformat invalid) and completely swapped to netbeans 4.0, that dislikes a lot how J3D project is done, making it very difficult to work with it, try and fix.
I'll reinstall a netbeans 3.6, a 1.4 jdk, disable hardware acceleration for rendering and recreate a compilable project tomorrow. If that does not make my configuration explode, i'll look into that.
/me crosses fingers.

pepe
Offline
Joined: 2003-06-10

I've succesfully updated J3D (both core and core-utils) to handle MouseWheel events.
Who do i sent the changed files to?

jada
Offline
Joined: 2004-03-17

Cool! Please send them to me.

thanks,
Chien.

pepe
Offline
Joined: 2003-06-10

Done. You have mail.

jada
Offline
Joined: 2004-03-17

Thanks! It's now on our plate. :-)

- Chien.

nikolai
Offline
Joined: 2003-06-10

Yes, unsupported.

Read about it here:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4783638