由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Consuming mouse event messages?
相关主题
How to move mouse automatically?求助Java Image Tools or API
第十章 编程实例求教
Top Ten Errors Java Programmers Make(9)AWT tooltip?
Re: FileDialog 的问题swing question
Re: AWT 和 SWING 在程序应用中有什么区别?simple swing question
Re: AWT和SWING到底有什么不同?Question: OutOfMemoryError when drawImag
How about Swing?help: where to download JAVA/swing? (转载)
question about repaint, update and paintJ2EE入门
相关话题的讨论汇总
话题: mouse话题: event话题: drag话题: messages话题: consuming
进入Java版参与讨论
1 (共1页)
c*****t
发帖数: 1879
1
I have a piece of code that takes quite a bit time executing responding
to a mouse drag event messsage. Due to this, doing a drag with mouse
would cause long long delays before the last message went through.
So my question is, is it possible to edit the event queue to remove
some of those drag messages? So that my code only process the most
recent mouse drag event message? Any pointers?
Thanks a lot.
w*******g
发帖数: 9932
2
try to call a method to determine whether the mouse has stopped moving before
processing that event.

【在 c*****t 的大作中提到】
: I have a piece of code that takes quite a bit time executing responding
: to a mouse drag event messsage. Due to this, doing a drag with mouse
: would cause long long delays before the last message went through.
: So my question is, is it possible to edit the event queue to remove
: some of those drag messages? So that my code only process the most
: recent mouse drag event message? Any pointers?
: Thanks a lot.

c*****t
发帖数: 1879
3
1. can't do that because my program basically does 3D curve tracing :)
2. found the solution using a fairly ugly method, but worked. The code
is AWT related :(

【在 w*******g 的大作中提到】
: try to call a method to determine whether the mouse has stopped moving before
: processing that event.

1 (共1页)
进入Java版参与讨论
相关主题
J2EE入门Re: AWT 和 SWING 在程序应用中有什么区别?
有没有类似MS Visual Studio的Java IDE?Re: AWT和SWING到底有什么不同?
问个进度条的问题How about Swing?
[转帖]如何才算掌握Java(J2SE篇)question about repaint, update and paint
How to move mouse automatically?求助Java Image Tools or API
第十章 编程实例求教
Top Ten Errors Java Programmers Make(9)AWT tooltip?
Re: FileDialog 的问题swing question
相关话题的讨论汇总
话题: mouse话题: event话题: drag话题: messages话题: consuming