当前位置: 首页>>代码示例>>Java>>正文


Java Event类代码示例

本文整理汇总了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);
}
 
开发者ID:nhrdl,项目名称:java_gnome,代码行数:16,代码来源:GraphicalTestCase.java

示例2: onDeleteEvent

import org.gnome.gdk.Event; //导入依赖的package包/类
@Override
public boolean onDeleteEvent(Widget source, Event event) {
    // Close the program
    GnomeSplit.quit();

    return true;
}
 
开发者ID:respawner,项目名称:gnome-split,代码行数:8,代码来源:UserInterface.java

示例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();
}
 
开发者ID:nhrdl,项目名称:java_gnome,代码行数:55,代码来源:Browser.java

示例4: onDeleteEvent

import org.gnome.gdk.Event; //导入依赖的package包/类
@Override
public boolean onDeleteEvent(Widget source, Event event) {
    this.emitResponse(ResponseType.CLOSE);
    return false;
}
 
开发者ID:respawner,项目名称:gnome-split,代码行数:6,代码来源:AssistantDialog.java

示例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);
 
开发者ID:nhrdl,项目名称:java_gnome,代码行数:8,代码来源:Widget.java

示例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);
 
开发者ID:nhrdl,项目名称:java_gnome,代码行数:8,代码来源:Widget.java

示例7: onIconPress

import org.gnome.gdk.Event; //导入依赖的package包/类
public void onIconPress(Entry source, EntryIconPosition position, Event event); 
开发者ID:nhrdl,项目名称:java_gnome,代码行数:2,代码来源:Entry.java

示例8: onIconRelease

import org.gnome.gdk.Event; //导入依赖的package包/类
public void onIconRelease(Entry source, EntryIconPosition position, Event event); 
开发者ID:nhrdl,项目名称:java_gnome,代码行数:2,代码来源:Entry.java

示例9: onDeleteEvent

import org.gnome.gdk.Event; //导入依赖的package包/类
public boolean onDeleteEvent(Widget source, Event event); 
开发者ID:nhrdl,项目名称:java_gnome,代码行数:2,代码来源:Window.java


注:本文中的org.gnome.gdk.Event类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。