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


Java SunToolkit.invokeLaterOnAppContext方法代码示例

本文整理汇总了Java中sun.awt.SunToolkit.invokeLaterOnAppContext方法的典型用法代码示例。如果您正苦于以下问题:Java SunToolkit.invokeLaterOnAppContext方法的具体用法?Java SunToolkit.invokeLaterOnAppContext怎么用?Java SunToolkit.invokeLaterOnAppContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.awt.SunToolkit的用法示例。


在下文中一共展示了SunToolkit.invokeLaterOnAppContext方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: postDragSourceDragEvent

import sun.awt.SunToolkit; //导入方法依赖的package包/类
protected final void postDragSourceDragEvent(final int targetAction,
                                             final int modifiers,
                                             final int x, final int y,
                                             final int dispatchType) {

    final int dropAction =
        SunDragSourceContextPeer.convertModifiersToDropAction(modifiers,
                                                              sourceActions);

    DragSourceDragEvent event =
        new DragSourceDragEvent(getDragSourceContext(),
                                dropAction,
                                targetAction & sourceActions,
                                modifiers, x, y);
    EventDispatcher dispatcher = new EventDispatcher(dispatchType, event);

    SunToolkit.invokeLaterOnAppContext(
        SunToolkit.targetToAppContext(getComponent()), dispatcher);

    startSecondaryEventLoop();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:SunDragSourceContextPeer.java

示例2: dragDropFinished

import sun.awt.SunToolkit; //导入方法依赖的package包/类
/**
 * upcall from native code via implemented class (do)
 */

protected final void dragDropFinished(final boolean success,
                                      final int operations,
                                      final int x, final int y) {
    DragSourceEvent event =
        new DragSourceDropEvent(getDragSourceContext(),
                                operations & sourceActions,
                                success, x, y);
    EventDispatcher dispatcher =
        new EventDispatcher(DISPATCH_FINISH, event);

    SunToolkit.invokeLaterOnAppContext(
        SunToolkit.targetToAppContext(getComponent()), dispatcher);

    startSecondaryEventLoop();
    setNativeContext(0);
    dragImage = null;
    dragImageOffset = null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:SunDragSourceContextPeer.java

示例3: dispatch

import sun.awt.SunToolkit; //导入方法依赖的package包/类
void dispatch(final _NativeEvent event, final Object... args) {
    // grab a local ref to the listeners and its contexts as an array of the map's entries
    final ArrayList<Map.Entry<L, AppContext>> localEntries;
    synchronized (this) {
        if (listenerToAppContext.size() == 0) {
            return;
        }
        localEntries = new ArrayList<Map.Entry<L, AppContext>>(listenerToAppContext.size());
        localEntries.addAll(listenerToAppContext.entrySet());
    }

    for (final Map.Entry<L, AppContext> e : localEntries) {
        final L listener = e.getKey();
        final AppContext listenerContext = e.getValue();
        SunToolkit.invokeLaterOnAppContext(listenerContext, new Runnable() {
            public void run() {
                performOnListener(listener, event);
            }
        });
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:_AppEventHandler.java

示例4: dragExit

import sun.awt.SunToolkit; //导入方法依赖的package包/类
/**
 * upcall from native code
 */

protected final void dragExit(final int x, final int y) {
    DragSourceEvent event =
        new DragSourceEvent(getDragSourceContext(), x, y);
    EventDispatcher dispatcher =
        new EventDispatcher(DISPATCH_EXIT, event);

    SunToolkit.invokeLaterOnAppContext(
        SunToolkit.targetToAppContext(getComponent()), dispatcher);

    startSecondaryEventLoop();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:SunDragSourceContextPeer.java

示例5: invokeOnEachAppContext

import sun.awt.SunToolkit; //导入方法依赖的package包/类
private void invokeOnEachAppContext(Runnable runnable) {
    for (AppContext appContext : AppContext.getAppContexts()) {
        SunToolkit.invokeLaterOnAppContext(appContext, runnable);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:XSystemTrayPeer.java


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