[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Event posted, but Filter isn't called
|
- From: Magnus Konze <bodomchild@xxxxxx>
- Date: Mon, 02 Jun 2008 14:19:19 +0200
- Newsgroups: eclipse.platform.swt
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.0 (Windows/20070326)
Hi!
I'm trying to post a selfgenerated Event in the Eventqueue. I've
registered a Filter on the Display, which should listen to my Event type
(SWT.MouseDown). It handles real Mouseclicks, but it seems to ignore my
own Event.
Here is a code snippet:
My Event:
Event event = new Event();
event.type = SWT.MouseDown;
event.button = 1;
Display.getDefault().post(event); (<-returns true)
My Filter:
display.addFilter(SWT.MouseDown, new Listener() {
public void handleEvent(Event event) {
System.out.println("mousedown");
}
});
Is it possible, that the Filter handles my Event? I'm not interested in
the Event itself, but i would like to run some code, when my fake Event
is dispatched.
(I'm working with the SWT_AWT bridge and probably have a synchronizing
problem between Swing and SWT. So my idea is to post the fake Event at
the end of the SWT queue and start my Swing code when the Filter handles
this Event.)
Regards Magnus