• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java NativeEventLoopRunningEvent类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中gnu.java.awt.peer.NativeEventLoopRunningEvent的典型用法代码示例。如果您正苦于以下问题:Java NativeEventLoopRunningEvent类的具体用法?Java NativeEventLoopRunningEvent怎么用?Java NativeEventLoopRunningEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

NativeEventLoopRunningEvent类属于gnu.java.awt.peer包,在下文中一共展示了NativeEventLoopRunningEvent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: postEventImpl

点赞 3

import gnu.java.awt.peer.NativeEventLoopRunningEvent; //导入依赖的package包/类
/**
 * Sorts events to their priority and calls
 * {@link #postEventImpl(AWTEvent, int)}.
 *
 * @param evt the event to post
 */
private synchronized final void postEventImpl(AWTEvent evt)
{
  int priority = NORM_PRIORITY;
  if (evt instanceof PaintEvent || evt instanceof LowPriorityEvent)
    priority = LOW_PRIORITY;
  // TODO: Maybe let Swing RepaintManager events also be processed with
  // low priority.
  if (evt instanceof NativeEventLoopRunningEvent)
    {
      nativeLoopRunning = ((NativeEventLoopRunningEvent) evt).isRunning();
      notify();
      return;
    }
  postEventImpl(evt, priority);
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:22,
代码来源:EventQueue.java

示例2: endMainThread

点赞 3

import gnu.java.awt.peer.NativeEventLoopRunningEvent; //导入依赖的package包/类
private static void endMainThread()
{
  synchronized (runningLock)
    {
      if (running)
        {
          GtkToolkit.gtkQuit();

          while (running)
            {
              try
                {
                  runningLock.wait();
                }
              catch (InterruptedException e)
                {
                  System.err.println ("GtkMainThread.endMainThread:"
                                      + " interrupted while waiting "
                                      + " for GTK main loop to stop");
                }
            }
          GtkGenericPeer.q()
            .postEvent(new NativeEventLoopRunningEvent(Boolean.FALSE));
          }
    }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:27,
代码来源:GtkMainThread.java

示例3: startMainThread

点赞 2

import gnu.java.awt.peer.NativeEventLoopRunningEvent; //导入依赖的package包/类
private static void startMainThread()
{
  synchronized (runningLock)
    {
      if (!running)
        {
          mainThread = new GtkMainThread();
          mainThread.start();

          while (!running)
            {
              try
                {
                  runningLock.wait();
                }
              catch (InterruptedException e)
                {
                  System.err.println ("GtkMainThread.startMainThread:"
                                      + " interrupted while waiting "
                                      + " for GTK main loop to start");
                }
            }
          GtkGenericPeer.q()
            .postEvent(new NativeEventLoopRunningEvent(Boolean.TRUE));
        }
    }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:28,
代码来源:GtkMainThread.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)