本文整理汇总了Java中org.gnome.gdk.Event类的典型用法代码示例。如果您正苦于以下问题:Java Event类的具体用法?Java Event怎么用?Java Event使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于org.gnome.gdk包,在下文中一共展示了Event类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runMainLoop
import org.gnome.gdk.Event; //导入依赖的package包/类
/**
* Just for hacking... sometimes when you're creating a unit test you need
* to see it run to make sure it looks the way it should before probing
* its qualities.
*/
protected static void runMainLoop(Window w) {
w.connect(new Window.DeleteEvent() {
public boolean onDeleteEvent(Widget source, Event event) {
Gtk.mainQuit();
return false;
}
});
Gtk.main();
System.exit(0);
}
示例2: onDeleteEvent
import org.gnome.gdk.Event; //导入依赖的package包/类
@Override
public boolean onDeleteEvent(Widget source, Event event) {
// Close the program
GnomeSplit.quit();
return true;
}
示例3: main
import org.gnome.gdk.Event; //导入依赖的package包/类
public static void main(final String[] args) throws InterruptedException {
if (args.length != 1) {
System.err.println("Usage Browser <url>");
System.exit(1);
}
Gtk.init(args);
final Window window = new Window();
window.setTitle("Webkit browser");
window.connect(new Window.DeleteEvent() {
public boolean onDeleteEvent(final Widget source, final Event event) {
Gtk.mainQuit();
return false;
}
});
final WebView wv = new WebView();
wv.enableWebInspector(true);
wv.loadUri(args[0]);
final Notebook book = new Notebook();
book.appendPage(wv, null);
final NewWindowHandler newWin = new NewWindowHandler() {
private WebView view;
public WebView createNewWindow() {
this.view = new WebView();
book.appendPage(view, null);
view.showAll();
return view;
}
public WebView getMasterView() {
return view;
}
};
wv.setNewWindowHandler(newWin);
window.add(book);
Gtk.idleAdd(new Handler() {
public boolean run() {
// wv.loadUri(args[0]);
return false;
}
});
window.showAll();
window.setMaximize(true);
Gtk.main();
}
示例4: onDeleteEvent
import org.gnome.gdk.Event; //导入依赖的package包/类
@Override
public boolean onDeleteEvent(Widget source, Event event) {
this.emitResponse(ResponseType.CLOSE);
return false;
}
示例5: onUnmapEvent
import org.gnome.gdk.Event; //导入依赖的package包/类
/**
* Although this is an <var>event-signal</var>, this merely reports
* information coming from the underlying X11 windowing system. It's
* information you can monitor, but don't try to block this signal.
* Return <code>false</code>!
*/
boolean onUnmapEvent(Widget source, Event event);
示例6: onMapEvent
import org.gnome.gdk.Event; //导入依赖的package包/类
/**
* Although this is an <var>event-signal</var>, this merely reports
* information coming from the underlying X11 windowing system. It's
* information you can monitor, but don't try to block this signal.
* Return <code>false</code>!
*/
public boolean onMapEvent(Widget source, Event event);
示例7: onIconPress
import org.gnome.gdk.Event; //导入依赖的package包/类
public void onIconPress(Entry source, EntryIconPosition position, Event event);
示例8: onIconRelease
import org.gnome.gdk.Event; //导入依赖的package包/类
public void onIconRelease(Entry source, EntryIconPosition position, Event event);
示例9: onDeleteEvent
import org.gnome.gdk.Event; //导入依赖的package包/类
public boolean onDeleteEvent(Widget source, Event event);