Re: [Java-gnome-developer] on event occurs when invoking org.gnome.gtk.Test.sendClick
Brought to you by:
afcowie
|
From: Alexey T. <a.m...@gm...> - 2013-06-14 12:52:51
|
Yes, I ran java-gnome tests and they passed fine. But I didn't find usage
of sendClick method...
This code should to press button "TEST". After that clicked[0] should be
true. But it is false...
Window window;
final boolean[] clicked = new boolean[]{false};
final Button button;
Gtk.init(new String[]{});
window = new Window();
Box box = new Box(Orientation.HORIZONTAL, 3);
button = new Button("TEST");
box.add(button);
button.connect(new Clicked() {
@Override
public void onClicked(Button source) {
clicked[0] = true;
}
});
window.add(box);
window.showAll();
Glib.idleAdd(new Handler() {
@Override
public boolean run() {
org.gnome.gtk.Test.sendClick(button, MouseButton.LEFT,
ModifierType.NONE);
System.out.println(clicked[0]);
return false;
}
});
Gtk.main();
|